public class FastSortedSet<E> extends FastSet<E> implements SortedSet<E>
A high-performance sorted set with real-time behavior.
FastCollection.Text| Modifier | Constructor and Description |
|---|---|
|
FastSortedSet()
Creates an empty sorted set ordered on elements natural order.
|
|
FastSortedSet(Equality<? super E> comparator)
Creates an empty sorted set ordered using the specified comparator.
|
protected |
FastSortedSet(SortedSetService<E> service)
Creates a sorted set backed up by the specified service implementation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
Adds the specified element to this collection
|
FastSortedSet<E> |
atomic()
Returns an atomic view over this collection.
|
boolean |
contains(Object obj)
Indicates if this collection contains the specified element.
|
E |
first()
Returns the first (lowest) element currently in this set.
|
FastSortedSet<E> |
headSet(E toElement)
Returns a view of the portion of this set whose elements are strictly less than toElement.
|
E |
last()
Returns the last (highest) element currently in this set.
|
static <E> FastSortedSet<E> |
of(Collection<? extends E> that)
Returns a new sorted set holding the same elements as the specified
collection (convenience method).
|
static <E> FastSortedSet<E> |
of(E... elements)
Returns a new sorted set holding the specified elements
(convenience method).
|
boolean |
remove(Object obj)
Removes the specified element from this collection.
|
protected SortedSetService<E> |
service()
Returns the service implementation of this collection (for sub-classes).
|
FastSortedSet<E> |
shared()
Returns a thread-safe view over this collection.
|
FastSortedSet<E> |
subSet(E fromElement,
E toElement)
Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
|
FastSortedSet<E> |
tailSet(E fromElement)
Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
|
FastSortedSet<E> |
unmodifiable()
Returns an unmodifiable view over this collection.
|
addAll, any, comparator, comparator, containsAll, distinct, equals, forEach, hashCode, iterator, mapped, max, min, parallel, perform, reduce, removeAll, removeIf, retainAll, reversed, sequential, serviceOf, sorted, sorted, toArray, toArray, toString, updateclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparatorpublic FastSortedSet()
public FastSortedSet(Equality<? super E> comparator)
protected FastSortedSet(SortedSetService<E> service)
public static <E> FastSortedSet<E> of(E... elements)
public static <E> FastSortedSet<E> of(Collection<? extends E> that)
public FastSortedSet<E> atomic()
FastCollectionConcurrentModificationException possible).public FastSortedSet<E> shared()
FastCollectionConcurrentModificationException possible).public FastSortedSet<E> unmodifiable()
FastCollectionUnsupportedOperationException being raised.unmodifiable in class FastSet<E>@Realtime(limit=LOG_N) public boolean add(E e)
FastCollectionadd in interface Collection<E>add in interface Set<E>add in class FastCollection<E>@Realtime(limit=LOG_N) public boolean contains(Object obj)
FastCollection@Realtime(limit=LOG_N) public boolean remove(Object obj)
FastCollection@Realtime(limit=LOG_N) public FastSortedSet<E> subSet(E fromElement, E toElement)
@Realtime(limit=LOG_N) public FastSortedSet<E> headSet(E toElement)
@Realtime(limit=LOG_N) public FastSortedSet<E> tailSet(E fromElement)
public E first()
public E last()
protected SortedSetService<E> service()
FastCollectionCopyright © 2017. All rights reserved.