public class BisectionSet<A> extends AbstractSet<A> implements SortedSet<A>
| Modifier and Type | Field and Description |
|---|---|
protected Comparator<? super A> |
comparator |
protected List<? extends A> |
elems |
protected int |
length |
protected int |
offset |
| Modifier | Constructor and Description |
|---|---|
protected |
BisectionSet(Comparator<? super A> comparator,
List<? extends A> elems,
int offset,
int length) |
|
BisectionSet(SortedList<A> elems) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
bisect(A a) |
Comparator<? super A> |
comparator() |
boolean |
contains(Object a) |
A |
first() |
BisectionSet<A> |
headSet(A a) |
Iterator<A> |
iterator() |
A |
last() |
protected BisectionSet<A> |
shift(int offset,
int length) |
int |
size() |
BisectionSet<A> |
subSet(A a,
A b) |
BisectionSet<A> |
tailSet(A a) |
equals, hashCode, removeAlladd, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratoradd, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArrayparallelStream, removeIf, streamprotected final Comparator<? super A> comparator
protected final int offset
protected final int length
public BisectionSet(SortedList<A> elems)
protected BisectionSet(Comparator<? super A> comparator, List<? extends A> elems, int offset, int length)
public int size()
size in interface Collection<A>size in interface Set<A>size in class AbstractCollection<A>public boolean contains(Object a)
contains in interface Collection<A>contains in interface Set<A>contains in class AbstractCollection<A>public Comparator<? super A> comparator()
comparator in interface SortedSet<A>protected int bisect(A a)
protected BisectionSet<A> shift(int offset, int length)
see also the complete user documentation .