it.unimi.dsi.fastutil
Class Sets.EmptySet

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractObjectCollection
      extended byit.unimi.dsi.fastutil.Collections.EmptyCollection
          extended byit.unimi.dsi.fastutil.Sets.EmptySet
All Implemented Interfaces:
BooleanCollection, BooleanSet, ByteCollection, ByteSet, ByteSortedSet, CharCollection, CharSet, CharSortedSet, Cloneable, Collection, DoubleCollection, DoubleSet, DoubleSortedSet, FloatCollection, FloatSet, FloatSortedSet, IntCollection, IntSet, IntSortedSet, LongCollection, LongSet, LongSortedSet, ObjectCollection, ObjectSet, ObjectSortedSet, ReferenceCollection, ReferenceSet, ReferenceSortedSet, Serializable, Set, ShortCollection, ShortSet, ShortSortedSet, SortedSet
Enclosing class:
Sets

public static class Sets.EmptySet
extends Collections.EmptyCollection
implements BooleanSet, ByteSortedSet, ShortSortedSet, IntSortedSet, LongSortedSet, CharSortedSet, FloatSortedSet, DoubleSortedSet, ObjectSortedSet, ReferenceSortedSet, Serializable, Cloneable

An immutable class representing the empty (sorted) set and implementing all type-specific set interfaces.

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

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Method Summary
 ByteComparator byteComparator()
           
 CharComparator charComparator()
           
 Object clone()
           
 Comparator comparator()
           
 DoubleComparator doubleComparator()
           
 Object first()
           
 boolean firstBoolean()
           
 byte firstByte()
           
 char firstChar()
           
 double firstDouble()
           
 float firstFloat()
           
 int firstInt()
           
 long firstLong()
           
 short firstShort()
           
 FloatComparator floatComparator()
           
 ByteSortedSet headSet(byte from)
           
 CharSortedSet headSet(char from)
           
 DoubleSortedSet headSet(double from)
           
 FloatSortedSet headSet(float from)
           
 IntSortedSet headSet(int from)
           
 LongSortedSet headSet(long from)
           
 SortedSet headSet(Object from)
           
 ShortSortedSet headSet(short from)
           
 IntComparator intComparator()
           
 ByteBidirectionalIterator iterator(byte from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 CharBidirectionalIterator iterator(char from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 DoubleBidirectionalIterator iterator(double from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 FloatBidirectionalIterator iterator(float from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 IntBidirectionalIterator iterator(int from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 LongBidirectionalIterator iterator(long from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 ObjectBidirectionalIterator iterator(Object from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 ShortBidirectionalIterator iterator(short from)
          Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).
 Object last()
           
 boolean lastBoolean()
           
 byte lastByte()
           
 char lastChar()
           
 double lastDouble()
           
 float lastFloat()
           
 int lastInt()
           
 long lastLong()
           
 short lastShort()
           
 LongComparator longComparator()
           
 boolean remove(boolean k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(byte k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(char k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(double k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(float k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(int k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(long k)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(Object ok)
          Note that the corresponding method of the type-specific collection is rem().
 boolean remove(short k)
          Note that the corresponding method of the type-specific collection is rem().
 ShortComparator shortComparator()
           
 ByteSortedSet subSet(byte from, byte to)
           
 CharSortedSet subSet(char from, char to)
           
 DoubleSortedSet subSet(double from, double to)
           
 FloatSortedSet subSet(float from, float to)
           
 IntSortedSet subSet(int from, int to)
           
 LongSortedSet subSet(long from, long to)
           
 SortedSet subSet(Object from, Object to)
           
 ShortSortedSet subSet(short from, short to)
           
 ByteSortedSet tailSet(byte to)
           
 CharSortedSet tailSet(char to)
           
 DoubleSortedSet tailSet(double to)
           
 FloatSortedSet tailSet(float to)
           
 IntSortedSet tailSet(int to)
           
 LongSortedSet tailSet(long to)
           
 SortedSet tailSet(Object to)
           
 ShortSortedSet tailSet(short to)
           
 
Methods inherited from class it.unimi.dsi.fastutil.Collections.EmptyCollection
add, add, add, add, add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, booleanIterator, byteIterator, charIterator, clear, contains, contains, contains, contains, contains, contains, contains, contains, contains, containsAll, containsAll, containsAll, containsAll, containsAll, containsAll, containsAll, containsAll, doubleIterator, equals, floatIterator, hashCode, intIterator, iterator, longIterator, objectIterator, referenceIterator, rem, rem, rem, rem, rem, rem, rem, rem, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, retainAll, retainAll, retainAll, retainAll, retainAll, retainAll, retainAll, retainAll, shortIterator, size, toArray, toArray, toArray, toArray, toArray, toArray, toArray, toArray, toArray, toBooleanArray, toBooleanArray, toByteArray, toByteArray, toCharArray, toCharArray, toDoubleArray, toDoubleArray, toFloatArray, toFloatArray, toIntArray, toIntArray, toLongArray, toLongArray, toShortArray, toShortArray
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection
add, addAll, containsAll, isEmpty, rem, removeAll, retainAll, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanCollection
add, addAll, booleanIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toBooleanArray, toBooleanArray
 
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
add, addAll, byteIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toByteArray, toByteArray
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection
add, addAll, contains, containsAll, rem, removeAll, retainAll, shortIterator, toArray, toShortArray, toShortArray
 
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection
add, addAll, contains, containsAll, intIterator, rem, removeAll, retainAll, toArray, toIntArray, toIntArray
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, rem, removeAll, retainAll, toArray, toLongArray, toLongArray
 
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
add, addAll, charIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toCharArray, toCharArray
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
add, addAll, contains, containsAll, floatIterator, rem, removeAll, retainAll, toArray, toFloatArray, toFloatArray
 
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection
add, addAll, contains, containsAll, doubleIterator, rem, removeAll, retainAll, toArray, toDoubleArray, toDoubleArray
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection
objectIterator
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceCollection
objectIterator
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

remove

public boolean remove(Object ok)
Description copied from interface: ObjectSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

Specified by:
remove in interface Set
Overrides:
remove in class AbstractObjectCollection

remove

public boolean remove(boolean k)
Description copied from interface: BooleanSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(byte k)
Description copied from interface: ByteSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(char k)
Description copied from interface: CharSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(short k)
Description copied from interface: ShortSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(int k)
Description copied from interface: IntSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(long k)
Description copied from interface: LongSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(float k)
Description copied from interface: FloatSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

remove

public boolean remove(double k)
Description copied from interface: DoubleSet
Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

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

iterator

public ByteBidirectionalIterator iterator(byte from)
Description copied from interface: ByteSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface ByteSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public CharBidirectionalIterator iterator(char from)
Description copied from interface: CharSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface CharSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public ShortBidirectionalIterator iterator(short from)
Description copied from interface: ShortSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface ShortSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public IntBidirectionalIterator iterator(int from)
Description copied from interface: IntSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface IntSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public LongBidirectionalIterator iterator(long from)
Description copied from interface: LongSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface LongSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public FloatBidirectionalIterator iterator(float from)
Description copied from interface: FloatSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface FloatSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public DoubleBidirectionalIterator iterator(double from)
Description copied from interface: DoubleSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface DoubleSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

iterator

public ObjectBidirectionalIterator iterator(Object from)
Description copied from interface: ObjectSortedSet
Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

Specified by:
iterator in interface ObjectSortedSet
Parameters:
from - an element to start from.
Returns:
a bidirectional iterator iterator starting at the given element.

subSet

public ByteSortedSet subSet(byte from,
                            byte to)
Specified by:
subSet in interface ByteSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public CharSortedSet subSet(char from,
                            char to)
Specified by:
subSet in interface CharSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public ShortSortedSet subSet(short from,
                             short to)
Specified by:
subSet in interface ShortSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public IntSortedSet subSet(int from,
                           int to)
Specified by:
subSet in interface IntSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public LongSortedSet subSet(long from,
                            long to)
Specified by:
subSet in interface LongSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public FloatSortedSet subSet(float from,
                             float to)
Specified by:
subSet in interface FloatSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public DoubleSortedSet subSet(double from,
                              double to)
Specified by:
subSet in interface DoubleSortedSet
See Also:
SortedSet.subSet(Object,Object)

subSet

public SortedSet subSet(Object from,
                        Object to)
Specified by:
subSet in interface SortedSet

headSet

public ByteSortedSet headSet(byte from)
Specified by:
headSet in interface ByteSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public CharSortedSet headSet(char from)
Specified by:
headSet in interface CharSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public ShortSortedSet headSet(short from)
Specified by:
headSet in interface ShortSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public IntSortedSet headSet(int from)
Specified by:
headSet in interface IntSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public LongSortedSet headSet(long from)
Specified by:
headSet in interface LongSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public FloatSortedSet headSet(float from)
Specified by:
headSet in interface FloatSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public DoubleSortedSet headSet(double from)
Specified by:
headSet in interface DoubleSortedSet
See Also:
SortedSet.headSet(Object)

headSet

public SortedSet headSet(Object from)
Specified by:
headSet in interface SortedSet

tailSet

public ByteSortedSet tailSet(byte to)
Specified by:
tailSet in interface ByteSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public CharSortedSet tailSet(char to)
Specified by:
tailSet in interface CharSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public ShortSortedSet tailSet(short to)
Specified by:
tailSet in interface ShortSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public IntSortedSet tailSet(int to)
Specified by:
tailSet in interface IntSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public LongSortedSet tailSet(long to)
Specified by:
tailSet in interface LongSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public FloatSortedSet tailSet(float to)
Specified by:
tailSet in interface FloatSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public DoubleSortedSet tailSet(double to)
Specified by:
tailSet in interface DoubleSortedSet
See Also:
SortedSet.tailSet(Object)

tailSet

public SortedSet tailSet(Object to)
Specified by:
tailSet in interface SortedSet

first

public Object first()
Specified by:
first in interface SortedSet

firstBoolean

public boolean firstBoolean()

firstByte

public byte firstByte()
Specified by:
firstByte in interface ByteSortedSet
See Also:
SortedSet.first()

firstChar

public char firstChar()
Specified by:
firstChar in interface CharSortedSet
See Also:
SortedSet.first()

firstShort

public short firstShort()
Specified by:
firstShort in interface ShortSortedSet
See Also:
SortedSet.first()

firstInt

public int firstInt()
Specified by:
firstInt in interface IntSortedSet
See Also:
SortedSet.first()

firstLong

public long firstLong()
Specified by:
firstLong in interface LongSortedSet
See Also:
SortedSet.first()

firstFloat

public float firstFloat()
Specified by:
firstFloat in interface FloatSortedSet
See Also:
SortedSet.first()

firstDouble

public double firstDouble()
Specified by:
firstDouble in interface DoubleSortedSet
See Also:
SortedSet.first()

last

public Object last()
Specified by:
last in interface SortedSet

lastBoolean

public boolean lastBoolean()

lastByte

public byte lastByte()
Specified by:
lastByte in interface ByteSortedSet
See Also:
SortedSet.last()

lastChar

public char lastChar()
Specified by:
lastChar in interface CharSortedSet
See Also:
SortedSet.last()

lastShort

public short lastShort()
Specified by:
lastShort in interface ShortSortedSet
See Also:
SortedSet.last()

lastInt

public int lastInt()
Specified by:
lastInt in interface IntSortedSet
See Also:
SortedSet.last()

lastLong

public long lastLong()
Specified by:
lastLong in interface LongSortedSet
See Also:
SortedSet.last()

lastFloat

public float lastFloat()
Specified by:
lastFloat in interface FloatSortedSet
See Also:
SortedSet.last()

lastDouble

public double lastDouble()
Specified by:
lastDouble in interface DoubleSortedSet
See Also:
SortedSet.last()

comparator

public Comparator comparator()
Specified by:
comparator in interface SortedSet

byteComparator

public ByteComparator byteComparator()

charComparator

public CharComparator charComparator()

shortComparator

public ShortComparator shortComparator()

intComparator

public IntComparator intComparator()

longComparator

public LongComparator longComparator()

floatComparator

public FloatComparator floatComparator()

doubleComparator

public DoubleComparator doubleComparator()

clone

public Object clone()