public class BitLongSet extends LongSet.Base implements LongSortedSet
LongSortedSet
backed by two SparseBitSet
s for positive and negative values.
This LongSortedSet
covers all values between Long.MIN_VALUE
and Long.MAX_VALUE
inclusive.LongSortedSet.SubSet
LongSet.Base
Constructor and Description |
---|
BitLongSet() |
BitLongSet(long... xs) |
Modifier and Type | Method and Description |
---|---|
boolean |
addLong(long x) |
void |
clear() |
boolean |
containsLong(long x) |
boolean |
isEmpty() |
LongIterator |
iterator() |
boolean |
removeLong(long x) |
int |
size() |
equals, hashCode
toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparator, create, create, first, firstLong, headSet, headSet, last, lastLong, spliterator, subSet, subSet, tailSet, tailSet
add, addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray
addAllLongs, addAllLongs, removeIf, toLongArray
containsAllLongs, containsAllLongs, containsAnyLongs, containsAnyLongs, forEach, forEachLong, from, from, longStream, of, once, once, parallelLongStream, removeAllLongs, removeAllLongs, removeLongsIf, retainAllLongs, retainAllLongs, sequence
public int size()
size
in interface java.util.Collection<java.lang.Long>
size
in interface java.util.Set<java.lang.Long>
public LongIterator iterator()
iterator
in interface java.lang.Iterable<java.lang.Long>
iterator
in interface java.util.Collection<java.lang.Long>
iterator
in interface java.util.Set<java.lang.Long>
iterator
in interface LongIterable
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Long>
isEmpty
in interface java.util.Set<java.lang.Long>
isEmpty
in interface LongCollection
isEmpty
in interface LongIterable
isEmpty
in interface LongSet
public void clear()
clear
in interface java.util.Collection<java.lang.Long>
clear
in interface java.util.Set<java.lang.Long>
clear
in interface LongCollection
clear
in interface LongIterable
clear
in interface LongSet
public boolean addLong(long x)
addLong
in interface LongCollection
public boolean removeLong(long x)
removeLong
in interface LongIterable
public boolean containsLong(long x)
containsLong
in interface LongIterable