Package com.github.tommyettinger.ds
Class EnumMap.Entries<V>
- All Implemented Interfaces:
EnhancedCollection<Map.Entry<Enum<?>,,V>> Iterable<Map.Entry<Enum<?>,,V>> Collection<Map.Entry<Enum<?>,,V>> Set<Map.Entry<Enum<?>,V>>
- Direct Known Subclasses:
EnumOrderedMap.OrderedMapEntries
public static class EnumMap.Entries<V>
extends AbstractSet<Map.Entry<Enum<?>,V>>
implements EnhancedCollection<Map.Entry<Enum<?>,V>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EnumMap.Entry<V>protected EnumMap.MapIterator<V,Map.Entry<Enum<?>, V>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<Map.Entry<Enum<?>,V>> appendInto(Collection<Map.Entry<Enum<?>, V>> coll) Append the remaining items that this can iterate through into the given Collection.appendInto(Map<Enum<?>, V> coll) Append the remaining items that this can iterate through into the given Map.voidclear()booleanbooleancontainsAll(Collection<?> c) booleaninthashCode()EnumMap.MapIterator<V,Map.Entry<Enum<?>, V>> iterator()Returns an iterator over the elements contained in this collection.booleanbooleanremoveAll(Collection<?> c) Removes from this set all of its elements that are contained in the specified collection (optional operation).voidThe iterator is reused by this data structure, and you can reset it back to the start of the iteration order using this.booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) ObjectList<Map.Entry<Enum<?>,V>> toList()Returns a newObjectListcontaining the remaining items.toString()Methods inherited from class java.util.AbstractCollection
add, addAll, isEmptyMethods 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, toStringMethods inherited from interface java.util.Set
add, addAll, isEmpty, spliterator
-
Field Details
-
entry
-
iter
-
-
Constructor Details
-
Entries
-
-
Method Details
-
contains
-
remove
-
removeAll
Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets. -
retainAll
- Specified by:
retainAllin interfaceCollection<V>- Specified by:
retainAllin interfaceSet<V>- Overrides:
retainAllin classAbstractCollection<Map.Entry<Enum<?>,V>> - Parameters:
c-- "Implementation Requirements"
- This implementation iterates over this collection, checking each
element returned by the iterator in turn to see if it's contained
in the specified collection. If it's not so contained, it's removed
from this collection with the iterator's
removemethod.
-
containsAll
- Specified by:
containsAllin interfaceCollection<V>- Specified by:
containsAllin interfaceSet<V>- Overrides:
containsAllin classAbstractCollection<Map.Entry<Enum<?>,V>> - Parameters:
c- a Collection of any type- Returns:
- true if all elements in c are contained in this set; false otherwise
- See Also:
-
iterator
Returns an iterator over the elements contained in this collection. -
size
public int size() -
hashCode
public int hashCode() -
equals
-
toString
- Overrides:
toStringin classAbstractCollection<Map.Entry<Enum<?>,V>>
-
clear
public void clear() -
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. -
toArray
-
toArray
public <T> T[] toArray(T[] a) -
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
-