Java Code Examples for org.apache.commons.collections.map.ReferenceMap#HARD

The following examples show how to use org.apache.commons.collections.map.ReferenceMap#HARD . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: B_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final B_NL_O_S_SE_SL_Traverser<T> clone = (B_NL_O_S_SE_SL_Traverser<T>) super.split();

    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 2
Source File: LP_NL_O_OB_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final LP_NL_O_OB_P_S_SE_SL_Traverser<T> clone = (LP_NL_O_OB_P_S_SE_SL_Traverser<T>) super.split();
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 3
Source File: LP_NL_O_OB_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final LP_NL_O_OB_P_S_SE_SL_Traverser<R> clone = (LP_NL_O_OB_P_S_SE_SL_Traverser<R>) super.split(r, step);
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 4
Source File: LP_NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final LP_NL_O_OB_S_SE_SL_Traverser<T> clone = (LP_NL_O_OB_S_SE_SL_Traverser<T>) super.split();
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 5
Source File: LP_NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final LP_NL_O_OB_S_SE_SL_Traverser<R> clone = (LP_NL_O_OB_S_SE_SL_Traverser<R>) super.split(r, step);
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 6
Source File: B_LP_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final B_LP_NL_O_S_SE_SL_Traverser<T> clone = (B_LP_NL_O_S_SE_SL_Traverser<T>) super.split();
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 7
Source File: B_LP_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final B_LP_NL_O_S_SE_SL_Traverser<R> clone = (B_LP_NL_O_S_SE_SL_Traverser<R>) super.split(r, step);
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 8
Source File: B_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final B_NL_O_S_SE_SL_Traverser<R> clone = (B_NL_O_S_SE_SL_Traverser<R>) super.split(r, step);

    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 9
Source File: B_LP_NL_O_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final B_LP_NL_O_P_S_SE_SL_Traverser<T> clone = (B_LP_NL_O_P_S_SE_SL_Traverser<T>) super.split();
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 10
Source File: B_LP_NL_O_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final B_LP_NL_O_P_S_SE_SL_Traverser<R> clone = (B_LP_NL_O_P_S_SE_SL_Traverser<R>) super.split(r, step);
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 11
Source File: NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public Admin<T> split() {
    final NL_O_OB_S_SE_SL_Traverser<T> clone = (NL_O_OB_S_SE_SL_Traverser<T>) super.split();
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 12
Source File: NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 6 votes vote down vote up
@Override
public <R> Admin<R> split(final R r, final Step<T, R> step) {
    final NL_O_OB_S_SE_SL_Traverser<R> clone = (NL_O_OB_S_SE_SL_Traverser<R>) super.split(r, step);
    clone.nestedLoops = new Stack<>();
    for(LabelledCounter lc : this.nestedLoops)
        clone.nestedLoops.push((LabelledCounter) lc.clone());

    if (this.loopNames != null) {
        clone.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);

        final Iterator loopNamesIterator = this.loopNames.entrySet().iterator();
        while (loopNamesIterator.hasNext()) {
            final ReferenceMap.Entry pair = (ReferenceMap.Entry) loopNamesIterator.next();

            final int idx = this.nestedLoops.indexOf(pair.getValue());
            if (idx != -1)
                clone.loopNames.put(pair.getKey(), clone.nestedLoops.get(idx));
        }
    }

    return clone;
}
 
Example 13
Source File: B_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public B_NL_O_S_SE_SL_Traverser(final T t, final Step<T, ?> step, final long initialBulk) {
    super(t, step, initialBulk);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}
 
Example 14
Source File: PongoFactory.java    From scava with Eclipse Public License 2.0 4 votes vote down vote up
private PongoFactory(){
	cache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
	getContributors().add(new ClasspathPongoFactoryContributor());
}
 
Example 15
Source File: B_LP_NL_O_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public B_LP_NL_O_S_SE_SL_Traverser(final T t, final Step<T, ?> step, final long initialBulk) {
    super(t, step, initialBulk);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}
 
Example 16
Source File: LP_NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public LP_NL_O_OB_S_SE_SL_Traverser(final T t, final Step<T, ?> step) {
    super(t, step);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}
 
Example 17
Source File: B_LP_NL_O_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public B_LP_NL_O_P_S_SE_SL_Traverser(final T t, final Step<T, ?> step, final long initialBulk) {
    super(t, step, initialBulk);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}
 
Example 18
Source File: LP_NL_O_OB_P_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public LP_NL_O_OB_P_S_SE_SL_Traverser(final T t, final Step<T, ?> step) {
    super(t, step);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}
 
Example 19
Source File: NL_O_OB_S_SE_SL_Traverser.java    From tinkerpop with Apache License 2.0 4 votes vote down vote up
public NL_O_OB_S_SE_SL_Traverser(final T t, final Step<T, ?> step) {
    super(t, step);
    this.nestedLoops = new Stack<>();
    this.loopNames = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
}