public class FastSortedTable<E> extends FastTable<E>
A high-performance sorted table with real-time behavior.
Sorted table have significantly faster contains(java.lang.Object),
indexOf(java.lang.Object) and remove(java.lang.Object) methods).
This class is comparable to FastSortedSet in performance,
but it allows for duplicate and implements the List
interface.
FastCollection.Format | Modifier | Constructor and Description |
|---|---|
FastSortedTable ()
Creates an empty table sorted using its elements natural order.
|
|
FastSortedTable (Equality<? super E> comparator)
Creates an empty table sorted using the specified element comparator.
|
|
protected |
FastSortedTable (SortedTableService<E> service)
Creates a sorted table backed up by the specified service implementation.
|
| Modifier and Type | Method and Description |
|---|---|
FastSortedTable<E> |
addAll (E... elements)
Returns this collection with the specified element added.
|
FastSortedTable<E> |
addAll (FastCollection<? extends E> that)
Returns this collection with the specified collection's elements added
in sequence.
|
boolean |
addIfAbsent (E element)
Adds the specified element only if not already present.
|
FastSortedTable<E> |
atomic ()
Returns an atomic view over this collection.
|
boolean |
contains (Object obj)
Indicates if this collection contains the specified element.
|
int |
indexOf (Object obj)
Returns the index of the first occurrence of the specified element in this table,
or -1 if this table does not contain the element.
|
int |
positionOf (E element)
Returns what would be the index of the specified element if it were
to be added or the index of the specified element if already present.
|
boolean |
remove (Object obj)
Removes the specified element from this collection.
|
protected SortedTableService<E> |
service ()
Returns the service implementation of this collection (for sub-classes).
|
FastSortedTable<E> |
shared ()
Returns a thread-safe view over this collection.
|
FastSortedTable<E> |
unmodifiable ()
Returns an unmodifiable view over this collection.
|
add, addAll, addFirst, addLast, clear, descendingIterator, element, get, getFirst, getLast, isEmpty, lastIndexOf, listIterator, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, sort, subList, subTable add, addAll, any, comparator, containsAll, distinct, equals, filtered, forEach, hashCode, iterator, mapped, max, min, parallel, perform, reduce, removeAll, removeIf, retainAll, sequential, serviceOf, sorted, sorted, toArray, toArray, toImmutable, toString, update clone, finalize, getClass, notify, notifyAll, wait, wait, wait public FastSortedTable()
public FastSortedTable(Equality<? super E> comparator)
protected FastSortedTable(SortedTableService<E> service)
public FastSortedTable<E> atomic()
FastCollection ConcurrentModificationException possible).public FastSortedTable<E> shared()
FastCollection ConcurrentModificationException possible).public FastSortedTable<E> unmodifiable()
FastCollection UnsupportedOperationException being raised.unmodifiable in class FastTable<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 int indexOf(Object obj)
FastTable @Realtime(limit=LOG_N) public boolean addIfAbsent(E element)
true if the element has been added;
false otherwise.@Realtime(limit=LOG_N) public int positionOf(E element)
public FastSortedTable<E> addAll(E... elements)
FastCollection public FastSortedTable<E> addAll(FastCollection<? extends E> that)
FastCollection protected SortedTableService<E> service()
FastCollection Copyright © 2005-2013 Javolution. All Rights Reserved.