@Override public Long next() { synchronized (ColtHashSet.this) { if (versionSnapshot != version) { throw new ConcurrentModificationException(); } if (index >= mapKeyList.size()) { throw new NoSuchElementException(); } long value = mapKeyList.getQuick(index); index++; canRemove = true; return value; } }
@Override public Long next() { synchronized (ColtLongHashSet.this) { if (versionSnapshot != version) { throw new ConcurrentModificationException(); } if (index >= mapKeyList.size()) { throw new NoSuchElementException(); } long value = mapKeyList.getQuick(index); index++; canRemove = true; return value; } }
long formulaAndTierIndex = tiers.getQuick(0); long formulaIndexPart = formulaAndTierIndex & 0xFFFFFFFF00000000L; for (int i = 1; i < tiersCount; i++) long formulaAndTierIndex2 = tiers.getQuick(i); long formulaIndexPart2 = formulaAndTierIndex2 & 0xFFFFFFFF00000000L; if (formulaIndexPart != formulaIndexPart2)
for (int i = 0; i < size; i++) long key = toBeRemoved.getQuick(i); pairsToTiersIndex.removeKey(key);
private void addVarName(int varName) { LongArrayList pairs = fullIndex.getPairs(varName); if (pairs == null) { // There is no any pairs that contain this varName. // No need to add it to the index. return; } for (int i = 0; i < pairs.size(); i++) { long key = pairs.getQuick(i); if (!pairsToTiersIndex.containsKey(key)) { pairsToTiersIndex.put(key, fullIndex.pairsToTiersIndex.get(key)); } } } }
/** * Fills all keys and values <i>sorted ascending by key</i> into the specified lists. * Fills into the lists, starting at index 0. * After this call returns the specified lists both have a new size that equals <tt>this.size()</tt>. * <p> * <b>Example:</b> * <br> * <tt>keys = (8,7,6), values = (1,2,2) --> keyList = (6,7,8), valueList = (2,2,1)</tt> * * @param keyList the list to be filled with keys, can have any size. * @param valueList the list to be filled with values, can have any size. */ public void pairsSortedByKey(final LongArrayList keyList, final ObjectArrayList valueList) { keys(keyList); keyList.sort(); valueList.setSize(keyList.size()); for (int i=keyList.size(); --i >= 0; ) { valueList.setQuick(i,get(keyList.getQuick(i))); } } /**
/** * Fills all keys and values <i>sorted ascending by key</i> into the specified lists. * Fills into the lists, starting at index 0. * After this call returns the specified lists both have a new size that equals <tt>this.size()</tt>. * <p> * <b>Example:</b> * <br> * <tt>keys = (8,7,6), values = (1,2,2) --> keyList = (6,7,8), valueList = (2,2,1)</tt> * * @param keyList the list to be filled with keys, can have any size. * @param valueList the list to be filled with values, can have any size. */ public void pairsSortedByKey(final LongArrayList keyList, final ObjectArrayList valueList) { keys(keyList); keyList.sort(); valueList.setSize(keyList.size()); for (int i=keyList.size(); --i >= 0; ) { valueList.setQuick(i,get(keyList.getQuick(i))); } } /**
/** * Fills all keys and values <i>sorted ascending by key</i> into the * specified lists. Fills into the lists, starting at index 0. After this * call returns the specified lists both have a new size that equals * <tt>this.size()</tt>. * <p> * <b>Example:</b> <br> * <tt>keys = (8,7,6), values = (1,2,2) --> keyList = (6,7,8), valueList = (2,2,1)</tt> * * @param keyList * the list to be filled with keys, can have any size. * @param valueList * the list to be filled with values, can have any size. */ public void pairsSortedByKey(final LongArrayList keyList, final ObjectArrayList valueList) { keys(keyList); keyList.sort(); valueList.setSize(keyList.size()); for (int i = keyList.size(); --i >= 0;) { valueList.setQuick(i, get(keyList.getQuick(i))); } }