Package com.github.tommyettinger.ds
Class ObjectObjectMap.Entries<K,V>
- All Implemented Interfaces:
EnhancedCollection<Map.Entry<K,,V>> Iterable<Map.Entry<K,,V>> Collection<Map.Entry<K,,V>> Set<Map.Entry<K,V>>
- Direct Known Subclasses:
ObjectObjectOrderedMap.OrderedMapEntries
- Enclosing class:
- ObjectObjectMap<K,
V>
public static class ObjectObjectMap.Entries<K,V>
extends AbstractSet<Map.Entry<K,V>>
implements EnhancedCollection<Map.Entry<K,V>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendInto(Collection<Map.Entry<K, V>> coll) Append the remaining items that this can iterate through into the given Collection.appendInto(Map<K, V> coll) Append the remaining items that this can iterate through into the given Map.booleaninthashCode()iterator()Returns an iterator over the elements contained in this collection.voidThe iterator is reused by this data structure, and you can reset it back to the start of the iteration order using this.intsize()toList()Returns a newObjectListcontaining the remaining items.toString()Methods inherited from class java.util.AbstractSet
equals, removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.github.tommyettinger.ds.EnhancedCollection
add, add, add, addAll, addAll, addAll, addAllIterable, addLegible, addLegible, addVarargs, appendTo, appendTo, containsAll, containsAll, containsAll, containsAllIterable, containsAny, containsAny, containsAny, containsAnyIterable, first, removeAll, removeAll, removeAll, removeAllIterable, removeEach, removeEach, removeEach, removeEachIterable, toString, toString, toString
-
Field Details
-
entry
-
iter
-
-
Constructor Details
-
Entries
-
-
Method Details
-
contains
-
iterator
Returns an iterator over the elements contained in this collection. -
size
public int size() -
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classAbstractCollection<Map.Entry<K,V>>
-
resetIterator
public void resetIterator()The iterator is reused by this data structure, and you can reset it back to the start of the iteration order using this. -
toList
Returns a newObjectListcontaining the remaining items. Does not change the position of this iterator. -
appendInto
Append the remaining items that this can iterate through into the given Collection. Does not change the position of this iterator.- Parameters:
coll- any modifiable Collection; may have items appended into it- Returns:
- the given collection
-
appendInto
Append the remaining items that this can iterate through into the given Map. Does not change the position of this iterator. Note that a Map is not a Collection.- Parameters:
coll- any modifiable Map; may have items appended into it- Returns:
- the given map
-