Package com.github.tommyettinger.ds
Class EnumMap.Values<V>
java.lang.Object
java.util.AbstractCollection<V>
com.github.tommyettinger.ds.EnumMap.Values<V>
- All Implemented Interfaces:
EnhancedCollection<V>,Iterable<V>,Collection<V>
- Direct Known Subclasses:
EnumOrderedMap.OrderedMapValues
public static class EnumMap.Values<V>
extends AbstractCollection<V>
implements EnhancedCollection<V>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendInto(Collection<V> coll) Append the remaining items that this can iterate through into the given Collection.voidclear()booleanfinal booleaninthashCode()iterator()Returns an iterator over the elements contained in this collection.booleanbooleanremoveAll(Collection<?> c) 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) toList()Returns a newObjectListcontaining the remaining items.toString()Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmptyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
add, addAll, containsAll, isEmpty, parallelStream, removeIf, spliterator, 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
-
iter
-
-
Constructor Details
-
Values
-
-
Method Details
-
iterator
Returns an iterator over the elements contained in this collection.- Specified by:
iteratorin interfaceCollection<V>- Specified by:
iteratorin interfaceIterable<V>- Specified by:
iteratorin classAbstractCollection<V>- Returns:
- an iterator over the elements contained in this collection
-
contains
- Specified by:
containsin interfaceCollection<V>- Overrides:
containsin classAbstractCollection<V>
-
remove
- Specified by:
removein interfaceCollection<V>- Overrides:
removein classAbstractCollection<V>- Parameters:
o- the item to try to remove- Returns:
- true if the item was removed successfully; false otherwise
-
removeAll
- Specified by:
removeAllin interfaceCollection<V>- Overrides:
removeAllin classAbstractCollection<V>- Parameters:
c- a Collection of any items to try to remove- Returns:
- true if this was modified as a result of this call, or false otherwise
-
retainAll
- Specified by:
retainAllin interfaceCollection<V>- Overrides:
retainAllin classAbstractCollection<V>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<V>- Overrides:
clearin classAbstractCollection<V>
-
equals
- Specified by:
equalsin interfaceCollection<V>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<V>- Overrides:
hashCodein classObject
-
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. -
toString
- Overrides:
toStringin classAbstractCollection<V>
-
size
public int size()- Specified by:
sizein interfaceCollection<V>- Specified by:
sizein classAbstractCollection<V>
-
toArray
- Specified by:
toArrayin interfaceCollection<V>- Overrides:
toArrayin classAbstractCollection<V>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<V>- Overrides:
toArrayin classAbstractCollection<V>- Parameters:
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
-