public int size() { return parent.size(); }
public int size() { return parent.size(); }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing values List<V> list = new ArrayList<V>(parent.size()); for (Iterator<V> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing keys List<K> list = new ArrayList<K>(parent.size()); for (Iterator<K> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
/** * Creates an entry set iterator. * Subclasses can override this to return iterators with different properties. * * @return the entrySet iterator */ protected Iterator<Map.Entry<K, V>> createEntrySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new EntrySetIterator<K, V>(this); }
/** * Creates a key set iterator. * Subclasses can override this to return iterators with different properties. * * @return the keySet iterator */ protected Iterator<K> createKeySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new KeySetIterator<K, V>(this); }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing values List<V> list = new ArrayList<V>(parent.size()); for (Iterator<V> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
/** * Gets the size of the map. * * @return the size */ public int size() { purgeBeforeRead(); return super.size(); }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing keys List<K> list = new ArrayList<K>(parent.size()); for (Iterator<K> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
/** * Creates an entry set iterator. * Subclasses can override this to return iterators with different properties. * * @return the entrySet iterator */ protected Iterator<Map.Entry<K, V>> createEntrySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new EntrySetIterator<K, V>(this); }
/** * Creates an entry set iterator. * Subclasses can override this to return iterators with different properties. * * @return the entrySet iterator */ protected Iterator<Entry<K, V>> createEntrySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new EntrySetIterator<K, V>(this); }
/** * Creates a values iterator. * Subclasses can override this to return iterators with different properties. * * @return the values iterator */ protected Iterator<V> createValuesIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new ValuesIterator<K, V>(this); }
/** * Gets the size of the map. * * @return the size */ public int size() { purgeBeforeRead(); return super.size(); }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing keys List<K> list = new ArrayList<K>(parent.size()); for (Iterator<K> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
/** * Creates a values iterator. * Subclasses can override this to return iterators with different properties. * * @return the values iterator */ protected Iterator<V> createValuesIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new ValuesIterator<K, V>(this); }
/** * Creates a key set iterator. * Subclasses can override this to return iterators with different properties. * * @return the keySet iterator */ protected Iterator<K> createKeySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new KeySetIterator<K, V>(this); }
public <T> T[] toArray(T[] arr) { // special implementation to handle disappearing values List<V> list = new ArrayList<V>(parent.size()); for (Iterator<V> it = iterator(); it.hasNext();) { list.add(it.next()); } return list.toArray(arr); } }
/** * Creates a key set iterator. * Subclasses can override this to return iterators with different properties. * * @return the keySet iterator */ protected Iterator<K> createKeySetIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new KeySetIterator<K, V>(this); }
/** * Creates a values iterator. * Subclasses can override this to return iterators with different properties. * * @return the values iterator */ protected Iterator<V> createValuesIterator() { if (size() == 0) { return EmptyIterator.INSTANCE; } return new ValuesIterator<K, V>(this); }
/** * Gets the size of the map. * * @return the size */ public int size() { purgeBeforeRead(); return super.size(); }