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
@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 2
@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 3
@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 4
@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 5
@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 6
@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 7
@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
@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 9
@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 10
@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 11
@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 12
@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 13
Source Project: scava   File: PongoFactory.java    License: 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 14
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);
}
 
Example 15
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 16
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 17
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 18
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 19
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);
}