Package it.unimi.dsi.fastutil.objects
Class ReferenceCollections.IterableCollection<K>
java.lang.Object
java.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
it.unimi.dsi.fastutil.objects.ReferenceCollections.IterableCollection<K>
- All Implemented Interfaces:
ObjectIterable<K>,ReferenceCollection<K>,Serializable,Iterable<K>,Collection<K>
- Enclosing class:
- ReferenceCollections
public static class ReferenceCollections.IterableCollection<K> extends AbstractReferenceCollection<K> implements Serializable
A collection wrapper class for iterables.
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description booleanisEmpty()ObjectIterator<K>iterator()Returns a type-specific iterator on the elements of this collection.intsize()Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<K>- Specified by:
sizein classAbstractCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>- Overrides:
isEmptyin classAbstractCollection<K>
-
iterator
Description copied from interface:ReferenceCollectionReturns a type-specific iterator on the elements of this collection.Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsCollection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Specified by:
iteratorin interfaceReferenceCollection<K>- Specified by:
iteratorin classAbstractReferenceCollection<K>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-