org.apache.commons.collections.map.ReferenceMap Java Examples
The following examples show how to use
org.apache.commons.collections.map.ReferenceMap.
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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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 |
@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: PersistentXSSUtils.java From zap-extensions with Apache License 2.0 | 5 votes |
/** Resets the state of {@code PersistentXSSUtils}. */ @SuppressWarnings("unchecked") public static void reset() { uniqueIndex = 0; map = new HashMap<>(); sourceToSinks = new HashMap<>(); cachedUris = Collections.synchronizedMap(new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT)); cachedParams = Collections.synchronizedMap(new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT)); }
Example #14
Source File: B_NL_O_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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 #15
Source File: PongoFactory.java From scava with Eclipse Public License 2.0 | 4 votes |
private PongoFactory(){ cache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT); getContributors().add(new ClasspathPongoFactoryContributor()); }
Example #16
Source File: B_LP_NL_O_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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 #17
Source File: B_LP_NL_O_P_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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
Source File: LP_NL_O_OB_P_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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 #20
Source File: NL_O_OB_S_SE_SL_Traverser.java From tinkerpop with Apache License 2.0 | 4 votes |
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); }