java.lang.Iterable<java.lang.Long>
, java.util.Collection<java.lang.Long>
, java.util.Set<java.lang.Long>
public class LongSet
extends java.lang.Object
implements java.util.Set<java.lang.Long>
Modifier and Type | Field | Description |
---|---|---|
static int |
INT_BITS |
a mask for int number values
|
protected int[] |
intArray |
|
static long |
LONG_BITS |
a mask for int number values
|
protected long[] |
longArray |
|
protected static int |
NEXT_FLAG |
Whether this number denotes the beginning of a grouping.
|
protected static long |
NEXT_FLAGL |
Whether this number denotes the beginning of a grouping.
|
static long |
OPTION_FLAG_LONG |
a secondary mask value for marking numbers
|
Constructor | Description |
---|---|
LongSet() |
Modifier and Type | Method | Description |
---|---|---|
LongSet |
add(long x) |
|
LongSet |
add(long from,
long to) |
|
LongSet |
add(LongSet grp) |
|
boolean |
add(java.lang.Long e) |
|
boolean |
addAll(java.util.Collection<? extends java.lang.Long> c) |
|
protected boolean |
checkIntArray() |
|
protected boolean |
checkLongArray() |
|
void |
clear() |
|
boolean |
contains(long x) |
|
boolean |
contains(java.lang.Object o) |
|
boolean |
containsAll(java.util.Collection<?> c) |
|
LongSet |
copyOf() |
|
int[] |
getAllIntNumbers() |
|
long[] |
getAllNumbers() |
|
int |
getIntIndex(int x) |
|
int |
getLongIndex(long y) |
|
long |
getRandom() |
|
boolean |
isEmpty() |
|
java.util.Iterator<java.lang.Long> |
iterator() |
|
LongSet |
parseString(java.lang.String txt) |
|
boolean |
remove(long x) |
|
boolean |
remove(LongSet grp) |
|
boolean |
remove(java.lang.Object o) |
|
boolean |
removeAll(java.util.Collection<?> c) |
|
boolean |
retainAll(java.util.Collection<?> c) |
|
int |
size() |
|
protected static void |
test(java.lang.String[] args) |
|
java.lang.Object[] |
toArray() |
|
<T> T[] |
toArray(T[] a) |
|
java.lang.String |
toString() |
protected static final int NEXT_FLAG
public static final int INT_BITS
protected static final long NEXT_FLAGL
public static final long LONG_BITS
public static final long OPTION_FLAG_LONG
protected volatile int[] intArray
protected volatile long[] longArray
public LongSet copyOf()
public boolean contains(long x)
public int getIntIndex(int x)
public int getLongIndex(long y)
public int[] getAllIntNumbers()
public long[] getAllNumbers()
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Long>
isEmpty
in interface java.util.Set<java.lang.Long>
public int size()
size
in interface java.util.Collection<java.lang.Long>
size
in interface java.util.Set<java.lang.Long>
public boolean remove(long x)
public boolean remove(LongSet grp)
protected boolean checkIntArray()
protected boolean checkLongArray()
public LongSet add(long x)
public LongSet add(long from, long to)
protected static void test(java.lang.String[] args)
public boolean add(java.lang.Long e)
add
in interface java.util.Collection<java.lang.Long>
add
in interface java.util.Set<java.lang.Long>
public boolean addAll(java.util.Collection<? extends java.lang.Long> c)
addAll
in interface java.util.Collection<java.lang.Long>
addAll
in interface java.util.Set<java.lang.Long>
public void clear()
clear
in interface java.util.Collection<java.lang.Long>
clear
in interface java.util.Set<java.lang.Long>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<java.lang.Long>
contains
in interface java.util.Set<java.lang.Long>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<java.lang.Long>
containsAll
in interface java.util.Set<java.lang.Long>
public java.util.Iterator<java.lang.Long> iterator()
iterator
in interface java.util.Collection<java.lang.Long>
iterator
in interface java.lang.Iterable<java.lang.Long>
iterator
in interface java.util.Set<java.lang.Long>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<java.lang.Long>
remove
in interface java.util.Set<java.lang.Long>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<java.lang.Long>
removeAll
in interface java.util.Set<java.lang.Long>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<java.lang.Long>
retainAll
in interface java.util.Set<java.lang.Long>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Long>
toArray
in interface java.util.Set<java.lang.Long>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<java.lang.Long>
toArray
in interface java.util.Set<java.lang.Long>
public java.lang.String toString()
toString
in class java.lang.Object
public LongSet parseString(java.lang.String txt)
public long getRandom()