it.unimi.dsi.fastutil
Class Collections.EmptyCollection

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractObjectCollection
      extended byit.unimi.dsi.fastutil.Collections.EmptyCollection
All Implemented Interfaces:
BooleanCollection, ByteCollection, CharCollection, Collection, DoubleCollection, FloatCollection, IntCollection, LongCollection, ObjectCollection, ReferenceCollection, ShortCollection
Direct Known Subclasses:
Lists.EmptyList, Sets.EmptySet
Enclosing class:
Collections

public abstract static class Collections.EmptyCollection
extends AbstractObjectCollection
implements BooleanCollection, ByteCollection, ShortCollection, IntCollection, LongCollection, CharCollection, FloatCollection, DoubleCollection, ObjectCollection, ReferenceCollection

An immutable class representing an empty collection and implementing all type-specific collection interfaces.

This class may be useful to implement your own in case you subclass a type-specific collection.


Method Summary
 boolean add(boolean k)
           
 boolean add(byte k)
           
 boolean add(char k)
           
 boolean add(double k)
           
 boolean add(float k)
           
 boolean add(int k)
           
 boolean add(long k)
           
 boolean add(short k)
           
 boolean addAll(BooleanCollection c)
           
 boolean addAll(BooleanList c)
           
 boolean addAll(ByteCollection c)
           
 boolean addAll(ByteList c)
           
 boolean addAll(CharCollection c)
           
 boolean addAll(CharList c)
           
 boolean addAll(DoubleCollection c)
           
 boolean addAll(DoubleList c)
           
 boolean addAll(FloatCollection c)
           
 boolean addAll(FloatList c)
           
 boolean addAll(IntCollection c)
           
 boolean addAll(IntList c)
           
 boolean addAll(LongCollection c)
           
 boolean addAll(LongList c)
           
 boolean addAll(ShortCollection c)
           
 boolean addAll(ShortList c)
           
 BooleanIterator booleanIterator()
          Returns a type-specific iterator on the collection.
 ByteIterator byteIterator()
          Returns a type-specific iterator on the collection.
 CharIterator charIterator()
          Returns a type-specific iterator on the collection.
 void clear()
           
 boolean contains(boolean k)
           
 boolean contains(byte k)
           
 boolean contains(char k)
           
 boolean contains(double k)
           
 boolean contains(float k)
           
 boolean contains(int k)
           
 boolean contains(long k)
           
 boolean contains(Object k)
           
 boolean contains(short k)
           
 boolean containsAll(BooleanCollection c)
           
 boolean containsAll(ByteCollection c)
           
 boolean containsAll(CharCollection c)
           
 boolean containsAll(DoubleCollection c)
           
 boolean containsAll(FloatCollection c)
           
 boolean containsAll(IntCollection c)
           
 boolean containsAll(LongCollection c)
           
 boolean containsAll(ShortCollection c)
           
 DoubleIterator doubleIterator()
          Returns a type-specific iterator on the collection.
 boolean equals(Object o)
           
 FloatIterator floatIterator()
          Returns a type-specific iterator on the collection.
 int hashCode()
           
 IntIterator intIterator()
          Returns a type-specific iterator on the collection.
 Iterator iterator()
          Delegates to the corresponding type-specific method.
 LongIterator longIterator()
          Returns a type-specific iterator on the collection.
 ObjectIterator objectIterator()
          Returns a type-specific iterator on the collection.
 ObjectIterator referenceIterator()
           
 boolean rem(boolean k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(byte k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(char k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(double k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(float k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(int k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(long k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean rem(short k)
          Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name.
 boolean removeAll(BooleanCollection c)
           
 boolean removeAll(ByteCollection c)
           
 boolean removeAll(CharCollection c)
           
 boolean removeAll(DoubleCollection c)
           
 boolean removeAll(FloatCollection c)
           
 boolean removeAll(IntCollection c)
           
 boolean removeAll(LongCollection c)
           
 boolean removeAll(ShortCollection c)
           
 boolean retainAll(BooleanCollection c)
           
 boolean retainAll(ByteCollection c)
           
 boolean retainAll(CharCollection c)
           
 boolean retainAll(DoubleCollection c)
           
 boolean retainAll(FloatCollection c)
           
 boolean retainAll(IntCollection c)
           
 boolean retainAll(LongCollection c)
           
 boolean retainAll(ShortCollection c)
           
 ShortIterator shortIterator()
          Returns a type-specific iterator on the collection.
 int size()
           
 Object[] toArray()
           
 boolean[] toArray(boolean[] a)
          Builds a primitive type array containing the items of this collection.
 byte[] toArray(byte[] a)
          Builds a primitive type array containing the items of this collection.
 char[] toArray(char[] a)
          Builds a primitive type array containing the items of this collection.
 double[] toArray(double[] a)
          Builds a primitive type array containing the items of this collection.
 float[] toArray(float[] a)
          Builds a primitive type array containing the items of this collection.
 int[] toArray(int[] a)
          Builds a primitive type array containing the items of this collection.
 long[] toArray(long[] a)
          Builds a primitive type array containing the items of this collection.
 short[] toArray(short[] a)
          Builds a primitive type array containing the items of this collection.
 boolean[] toBooleanArray()
          Returns a primitive type array containing the items of this collection.
 boolean[] toBooleanArray(boolean[] a)
          Builds a primitive type array containing the items of this collection.
 byte[] toByteArray()
          Returns a primitive type array containing the items of this collection.
 byte[] toByteArray(byte[] a)
          Builds a primitive type array containing the items of this collection.
 char[] toCharArray()
          Returns a primitive type array containing the items of this collection.
 char[] toCharArray(char[] a)
          Builds a primitive type array containing the items of this collection.
 double[] toDoubleArray()
          Returns a primitive type array containing the items of this collection.
 double[] toDoubleArray(double[] a)
          Builds a primitive type array containing the items of this collection.
 float[] toFloatArray()
          Returns a primitive type array containing the items of this collection.
 float[] toFloatArray(float[] a)
          Builds a primitive type array containing the items of this collection.
 int[] toIntArray()
          Returns a primitive type array containing the items of this collection.
 int[] toIntArray(int[] a)
          Builds a primitive type array containing the items of this collection.
 long[] toLongArray()
          Returns a primitive type array containing the items of this collection.
 long[] toLongArray(long[] a)
          Builds a primitive type array containing the items of this collection.
 short[] toShortArray()
          Returns a primitive type array containing the items of this collection.
 short[] toShortArray(short[] a)
          Builds a primitive type array containing the items of this collection.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection
add, addAll, containsAll, isEmpty, rem, remove, removeAll, retainAll, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray
 

Method Detail

add

public boolean add(boolean k)
Specified by:
add in interface BooleanCollection
See Also:
Collection.add(Object)

add

public boolean add(byte k)
Specified by:
add in interface ByteCollection
See Also:
Collection.add(Object)

add

public boolean add(char k)
Specified by:
add in interface CharCollection
See Also:
Collection.add(Object)

add

public boolean add(short k)
Specified by:
add in interface ShortCollection
See Also:
Collection.add(Object)

add

public boolean add(int k)
Specified by:
add in interface IntCollection
See Also:
Collection.add(Object)

add

public boolean add(long k)
Specified by:
add in interface LongCollection
See Also:
Collection.add(Object)

add

public boolean add(float k)
Specified by:
add in interface FloatCollection
See Also:
Collection.add(Object)

add

public boolean add(double k)
Specified by:
add in interface DoubleCollection
See Also:
Collection.add(Object)

addAll

public boolean addAll(BooleanList c)

addAll

public boolean addAll(ByteList c)

addAll

public boolean addAll(CharList c)

addAll

public boolean addAll(ShortList c)

addAll

public boolean addAll(IntList c)

addAll

public boolean addAll(LongList c)

addAll

public boolean addAll(FloatList c)

addAll

public boolean addAll(DoubleList c)

addAll

public boolean addAll(BooleanCollection c)
Specified by:
addAll in interface BooleanCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(ByteCollection c)
Specified by:
addAll in interface ByteCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(CharCollection c)
Specified by:
addAll in interface CharCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(ShortCollection c)
Specified by:
addAll in interface ShortCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(IntCollection c)
Specified by:
addAll in interface IntCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(LongCollection c)
Specified by:
addAll in interface LongCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(FloatCollection c)
Specified by:
addAll in interface FloatCollection
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(DoubleCollection c)
Specified by:
addAll in interface DoubleCollection
See Also:
Collection.addAll(Collection)

removeAll

public boolean removeAll(BooleanCollection c)
Specified by:
removeAll in interface BooleanCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(ByteCollection c)
Specified by:
removeAll in interface ByteCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(CharCollection c)
Specified by:
removeAll in interface CharCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(ShortCollection c)
Specified by:
removeAll in interface ShortCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(IntCollection c)
Specified by:
removeAll in interface IntCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(LongCollection c)
Specified by:
removeAll in interface LongCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(FloatCollection c)
Specified by:
removeAll in interface FloatCollection
See Also:
Collection.removeAll(Collection)

removeAll

public boolean removeAll(DoubleCollection c)
Specified by:
removeAll in interface DoubleCollection
See Also:
Collection.removeAll(Collection)

containsAll

public boolean containsAll(BooleanCollection c)
Specified by:
containsAll in interface BooleanCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(ByteCollection c)
Specified by:
containsAll in interface ByteCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(CharCollection c)
Specified by:
containsAll in interface CharCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(ShortCollection c)
Specified by:
containsAll in interface ShortCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(IntCollection c)
Specified by:
containsAll in interface IntCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(LongCollection c)
Specified by:
containsAll in interface LongCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(FloatCollection c)
Specified by:
containsAll in interface FloatCollection
See Also:
Collection.containsAll(Collection)

containsAll

public boolean containsAll(DoubleCollection c)
Specified by:
containsAll in interface DoubleCollection
See Also:
Collection.containsAll(Collection)

retainAll

public boolean retainAll(BooleanCollection c)
Specified by:
retainAll in interface BooleanCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(ByteCollection c)
Specified by:
retainAll in interface ByteCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(CharCollection c)
Specified by:
retainAll in interface CharCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(ShortCollection c)
Specified by:
retainAll in interface ShortCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(IntCollection c)
Specified by:
retainAll in interface IntCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(LongCollection c)
Specified by:
retainAll in interface LongCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(FloatCollection c)
Specified by:
retainAll in interface FloatCollection
See Also:
Collection.retainAll(Collection)

retainAll

public boolean retainAll(DoubleCollection c)
Specified by:
retainAll in interface DoubleCollection
See Also:
Collection.retainAll(Collection)

rem

public boolean rem(boolean k)
Description copied from interface: BooleanCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface BooleanCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(byte k)
Description copied from interface: ByteCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface ByteCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(char k)
Description copied from interface: CharCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface CharCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(short k)
Description copied from interface: ShortCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface ShortCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(int k)
Description copied from interface: IntCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface IntCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(long k)
Description copied from interface: LongCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface LongCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(float k)
Description copied from interface: FloatCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface FloatCollection
See Also:
Collection.remove(Object)

rem

public boolean rem(double k)
Description copied from interface: DoubleCollection
Note that this method should be called remove(), but the clash with the similarly named index-based method in the List interface forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().

Specified by:
rem in interface DoubleCollection
See Also:
Collection.remove(Object)

contains

public boolean contains(Object k)
Specified by:
contains in interface Collection

contains

public boolean contains(boolean k)
Specified by:
contains in interface BooleanCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(byte k)
Specified by:
contains in interface ByteCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(char k)
Specified by:
contains in interface CharCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(short k)
Specified by:
contains in interface ShortCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(int k)
Specified by:
contains in interface IntCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(long k)
Specified by:
contains in interface LongCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(float k)
Specified by:
contains in interface FloatCollection
See Also:
Collection.contains(Object)

contains

public boolean contains(double k)
Specified by:
contains in interface DoubleCollection
See Also:
Collection.contains(Object)

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection
Overrides:
toArray in class AbstractObjectCollection

toBooleanArray

public boolean[] toBooleanArray()
Description copied from interface: BooleanCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toBooleanArray in interface BooleanCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toByteArray

public byte[] toByteArray()
Description copied from interface: ByteCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toByteArray in interface ByteCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toCharArray

public char[] toCharArray()
Description copied from interface: CharCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toCharArray in interface CharCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toShortArray

public short[] toShortArray()
Description copied from interface: ShortCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toShortArray in interface ShortCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toIntArray

public int[] toIntArray()
Description copied from interface: IntCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toIntArray in interface IntCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toLongArray

public long[] toLongArray()
Description copied from interface: LongCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toLongArray in interface LongCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toFloatArray

public float[] toFloatArray()
Description copied from interface: FloatCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toFloatArray in interface FloatCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toDoubleArray

public double[] toDoubleArray()
Description copied from interface: DoubleCollection
Returns a primitive type array containing the items of this collection.

Specified by:
toDoubleArray in interface DoubleCollection
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray()

toBooleanArray

public boolean[] toBooleanArray(boolean[] a)
Description copied from interface: BooleanCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toBooleanArray in interface BooleanCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toByteArray

public byte[] toByteArray(byte[] a)
Description copied from interface: ByteCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toByteArray in interface ByteCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toCharArray

public char[] toCharArray(char[] a)
Description copied from interface: CharCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toCharArray in interface CharCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toShortArray

public short[] toShortArray(short[] a)
Description copied from interface: ShortCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toShortArray in interface ShortCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toIntArray

public int[] toIntArray(int[] a)
Description copied from interface: IntCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toIntArray in interface IntCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toLongArray

public long[] toLongArray(long[] a)
Description copied from interface: LongCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toLongArray in interface LongCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toFloatArray

public float[] toFloatArray(float[] a)
Description copied from interface: FloatCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toFloatArray in interface FloatCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toDoubleArray

public double[] toDoubleArray(double[] a)
Description copied from interface: DoubleCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toDoubleArray in interface DoubleCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public boolean[] toArray(boolean[] a)
Description copied from interface: BooleanCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface BooleanCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public byte[] toArray(byte[] a)
Description copied from interface: ByteCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface ByteCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public char[] toArray(char[] a)
Description copied from interface: CharCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface CharCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public short[] toArray(short[] a)
Description copied from interface: ShortCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface ShortCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public int[] toArray(int[] a)
Description copied from interface: IntCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface IntCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public long[] toArray(long[] a)
Description copied from interface: LongCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface LongCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public float[] toArray(float[] a)
Description copied from interface: FloatCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface FloatCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

toArray

public double[] toArray(double[] a)
Description copied from interface: DoubleCollection
Builds a primitive type array containing the items of this collection.

Specified by:
toArray in interface DoubleCollection
Parameters:
a - if this array is big enough, it will be used to store the collection.
Returns:
a primitive type array containing the items of this collection.
See Also:
Collection.toArray(Object[])

iterator

public Iterator iterator()
Description copied from class: AbstractObjectCollection
Delegates to the corresponding type-specific method.

Specified by:
iterator in interface Collection
Overrides:
iterator in class AbstractObjectCollection

booleanIterator

public BooleanIterator booleanIterator()
Description copied from interface: BooleanCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
booleanIterator in interface BooleanCollection
See Also:
Collection.iterator()

byteIterator

public ByteIterator byteIterator()
Description copied from interface: ByteCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
byteIterator in interface ByteCollection
See Also:
Collection.iterator()

charIterator

public CharIterator charIterator()
Description copied from interface: CharCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
charIterator in interface CharCollection
See Also:
Collection.iterator()

shortIterator

public ShortIterator shortIterator()
Description copied from interface: ShortCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
shortIterator in interface ShortCollection
See Also:
Collection.iterator()

intIterator

public IntIterator intIterator()
Description copied from interface: IntCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
intIterator in interface IntCollection
See Also:
Collection.iterator()

longIterator

public LongIterator longIterator()
Description copied from interface: LongCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
longIterator in interface LongCollection
See Also:
Collection.iterator()

floatIterator

public FloatIterator floatIterator()
Description copied from interface: FloatCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
floatIterator in interface FloatCollection
See Also:
Collection.iterator()

doubleIterator

public DoubleIterator doubleIterator()
Description copied from interface: DoubleCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
doubleIterator in interface DoubleCollection
See Also:
Collection.iterator()

objectIterator

public ObjectIterator objectIterator()
Description copied from interface: ObjectCollection
Returns a type-specific iterator on the collection.

The iterator returned by the Collection.iterator() method and by this method are identical; however, using this method you can save a type casting.

Specified by:
objectIterator in interface ObjectCollection
See Also:
Collection.iterator()

referenceIterator

public ObjectIterator referenceIterator()

size

public int size()
Specified by:
size in interface Collection

clear

public void clear()
Specified by:
clear in interface Collection
Overrides:
clear in class AbstractObjectCollection

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection