public class ConciseSet extends AbstractIntSet implements Serializable
IntSet internally represented by
compressed bitmaps though a RLE (Run-Length Encoding) compression algorithm.
See
http://ricerca.mat.uniroma3.it/users/dipietro/publications/0020-0190.pdf
for more details.
Notice that the iterator by iterator() is fail-fast,
similar to most Collection-derived classes. If the set is
structurally modified at any time after the iterator is created, the iterator
will throw a ConcurrentModificationException. Thus, in the face of
concurrent modification, the iterator fails quickly and cleanly, rather than
risking arbitrary, non-deterministic behavior at an undetermined time in the
future. The iterator throws a ConcurrentModificationException on a
best-effort basis. Therefore, it would be wrong to write a program that
depended on this exception for its correctness: the fail-fast behavior of
iterators should be used only to detect bugs.IntSet.IntIterator| Constructor and Description |
|---|
ConciseSet()
Creates an empty integer set
|
ConciseSet(boolean simulateWAH)
Creates an empty integer set
|
ConciseSet(int[] words,
boolean simulateWAH) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int e) |
boolean |
addAll(IntSet c) |
void |
clear() |
ConciseSet |
clone()
See the
clone() of Object |
int |
compareTo(IntSet o) |
boolean |
contains(int o) |
ConciseSet |
convert(int... a) |
IntSet.IntIterator |
descendingIterator() |
ConciseSet |
empty() |
boolean |
equals(Object obj) |
int[] |
getWords() |
int |
hashCode() |
ConciseSet |
intersection(IntSet other) |
boolean |
isEmpty() |
IntSet.IntIterator |
iterator() |
boolean |
remove(int o) |
int |
size() |
toStringpublic ConciseSet()
public ConciseSet(boolean simulateWAH)
simulateWAH - true if the class must simulate the behavior of
WAHpublic ConciseSet(int[] words,
boolean simulateWAH)
public ConciseSet clone()
clone() of Objectclone in interface IntSetclone in class AbstractIntSetpublic int[] getWords()
public ConciseSet intersection(IntSet other)
public IntSet.IntIterator iterator()
iterator in interface IntSetiterator in class AbstractIntSetIntSet.IntIterator instance to iterate over the setpublic IntSet.IntIterator descendingIterator()
descendingIterator in interface IntSetdescendingIterator in class AbstractIntSetIntSet.IntIterator instance to iterate over the set in
descending orderpublic void clear()
public ConciseSet convert(int... a)
public boolean add(int e)
public boolean remove(int o)
public boolean contains(int o)
public boolean isEmpty()
isEmpty in interface IntSetisEmpty in class AbstractIntSetpublic boolean addAll(IntSet c)
public int size()
size in interface IntSetsize in class AbstractIntSetpublic ConciseSet empty()
public int hashCode()
hashCode in class AbstractIntSetpublic boolean equals(Object obj)
equals in class AbstractIntSetpublic int compareTo(IntSet o)
compareTo in interface Comparable<IntSet>compareTo in class AbstractIntSetCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.