Package it.unimi.dsi.fastutil.longs
Class LongCollections.IterableCollection
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Long>
-
- it.unimi.dsi.fastutil.longs.AbstractLongCollection
-
- it.unimi.dsi.fastutil.longs.LongCollections.IterableCollection
-
- All Implemented Interfaces:
LongCollection
,LongIterable
,java.io.Serializable
,java.lang.Iterable<java.lang.Long>
,java.util.Collection<java.lang.Long>
- Enclosing class:
- LongCollections
public static class LongCollections.IterableCollection extends AbstractLongCollection implements java.io.Serializable
A collection wrapper class for iterables.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEmpty()
LongIterator
iterator()
Returns a type-specific iterator on the elements of this collection.LongIterator
longIterator()
Returns a primitive iterator on the elements of this collection.LongSpliterator
longSpliterator()
Returns a primitive spliterator on the elements of this collection.int
size()
LongSpliterator
spliterator()
Returns a type-specific spliterator on the elements of this collection.-
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, forEach, rem, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArray, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
clear, equals, hashCode, toArray, toArray, toArray
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
longParallelStream, longStream, parallelStream, removeIf, removeIf, stream
-
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Long>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Long>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.lang.Long>
-
iterator
public LongIterator iterator()
Description copied from interface:LongCollection
Returns a type-specific iterator on the elements of this collection.- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Long>
- Specified by:
iterator
in interfaceLongCollection
- Specified by:
iterator
in interfaceLongIterable
- Specified by:
iterator
in classAbstractLongCollection
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
spliterator
public LongSpliterator spliterator()
Description copied from interface:LongCollection
Returns a type-specific spliterator on the elements of this collection.See
Collection.spliterator()
for more documentation on the requirements of the returned spliterator.- Specified by:
spliterator
in interfacejava.util.Collection<java.lang.Long>
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.lang.Long>
- Specified by:
spliterator
in interfaceLongCollection
- Specified by:
spliterator
in interfaceLongIterable
- Returns:
- a type-specific spliterator on the elements of this collection.
-
longIterator
public LongIterator longIterator()
Description copied from interface:LongCollection
Returns a primitive iterator on the elements of this collection.This method is identical to
LongCollection.iterator()
, as the type-specific iterator is already compatible with the JDK's primitive iterators. It only exists for compatibility with the other primitive types'Collection
s that have use for widened iterators.- Specified by:
longIterator
in interfaceLongCollection
- Specified by:
longIterator
in interfaceLongIterable
- Returns:
- a primitive iterator on the elements of this collection.
-
longSpliterator
public LongSpliterator longSpliterator()
Description copied from interface:LongCollection
Returns a primitive spliterator on the elements of this collection.This method is identical to
LongCollection.spliterator()
, as the type-specific spliterator is already compatible with the JDK's primitive spliterators. It only exists for compatibility with the other primitive types'Collection
s that have use for widened spliterators.- Specified by:
longSpliterator
in interfaceLongCollection
- Specified by:
longSpliterator
in interfaceLongIterable
- Returns:
- a primitive spliterator on the elements of this collection.
-
-