java.lang.Object | |||
↳ | java.util.AbstractCollection<E> | ||
↳ | java.util.AbstractSet<E> | ||
↳ | com.pnfsoftware.jeb.util.collect.FastLongSet |
A (small) set of long
values backed by a Bitmap
for fast insertion/retrieval and
zero allocation at run-time. The set range must not exceed 4G; the recommended max range
should not exceed a few thousands.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FastLongSet(long from, long to)
Create a set.
| |||||||||||
FastLongSet(long end)
Create a set for the range [0, end).
| |||||||||||
FastLongSet(FastLongSet set0)
Duplicate an existing set.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | add(Long e) | ||||||||||
boolean | addAll(Collection<? extends Long> c) | ||||||||||
void |
addAllFast(FastLongSet other)
Fast version of
addAll(Collection) . | ||||||||||
void | clear() | ||||||||||
boolean | contains(Object o) | ||||||||||
boolean | containsAll(Collection<?> c) | ||||||||||
boolean | equals(Object obj) | ||||||||||
int | hashCode() | ||||||||||
boolean | isEmpty() | ||||||||||
Iterator<Long> | iterator() | ||||||||||
boolean | remove(Object o) | ||||||||||
int | size() | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.AbstractSet
| |||||||||||
From class
java.util.AbstractCollection
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Iterable
| |||||||||||
From interface
java.util.Collection
| |||||||||||
From interface
java.util.Set
|
Create a set.
from | range start (inclusive) |
---|---|
to | range end (exclusive) |
Create a set for the range [0, end).
end | range end (exclusive) |
---|
Fast version of addAll(Collection)
. Restrictions: the input collection must be a
FastLongSet
of the exact range.