@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
@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; }
/** * Adds a new key/file mapping to the pool. If a mapping with the same key exists, it is replaced and the previous * value returned. * * @param key the key that will later allow to retrieve the pooled file instance * @param value the file instance to add to the pool * @return returns the file instance previously mapped onto the given key, <code>null</code> if no * such mapping existed */ public synchronized AbstractFile put(Object key, AbstractFile value) { return (AbstractFile)hashMap.put(key, value); }
@Override public void initialiseLoops(final String stepLabel, final String loopName) { if (this.nestedLoops.empty() || !this.nestedLoops.peek().hasLabel(stepLabel)) { final LabelledCounter lc = new LabelledCounter(stepLabel, (short) 0); this.nestedLoops.push(lc); if (loopName != null) this.loopNames.put(loopName, lc); } }