public class FastSortedSet<E> extends FastSet<E> implements SortedSet<E>
A high-performance sorted set with real-time
behavior;
smooth capacity increase/decrease and minimal memory footprint.
FastCollection.StandardText
Modifier | Constructor and Description |
---|---|
|
FastSortedSet()
Creates an empty sorted set ordered on elements natural order.
|
|
FastSortedSet(EqualityComparator<? 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)
FastSet operations with different time limit behavior.
|
FastSortedSet<E> |
addAll(E... elements)
Misc.
|
FastSortedSet<E> |
addAll(FastCollection<? extends E> that)
Returns this collection with the specified collection's elements added.
|
boolean |
contains(Object obj) |
E |
first() |
FastSortedSet<E> |
headSet(E toElement) |
E |
last() |
boolean |
remove(Object obj) |
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)
SortedSet operations.
|
FastSortedSet<E> |
tailSet(E fromElement) |
FastSortedSet<E> |
unmodifiable()
Views.
|
addAll, atomic, comparator, comparator, containsAll, doWhile, equals, forEach, hashCode, iterator, mapped, parallel, reduce, removeAll, removeIf, retainAll, reversed, sequential, serviceOf, sorted, toArray, toArray, toImmutable, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparator
public FastSortedSet()
public FastSortedSet(EqualityComparator<? super E> comparator)
protected FastSortedSet(SortedSetService<E> service)
public FastSortedSet<E> unmodifiable()
unmodifiable
in class FastSet<E>
public FastSortedSet<E> shared()
FastCollection
immutable
collections to be replaced at each update rather than shared views.shared
in class FastSet<E>
@Realtime(limit=LOG_N) public boolean add(E e)
add
in interface Collection<E>
add
in interface Set<E>
add
in class FastCollection<E>
@Realtime(limit=LOG_N) public FastSortedSet<E> subSet(E fromElement, E toElement)
public FastSortedSet<E> addAll(E... elements)
public FastSortedSet<E> addAll(FastCollection<? extends E> that)
FastCollection
protected SortedSetService<E> service()
FastCollection
Copyright © 2005-2013 Javolution. All Rights Reserved.