|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<E> oracle.javatools.util.ArraySortedSet<E> oracle.ide.util.ArraySortedSet<E>
public class ArraySortedSet<E>
The ArraySortedSet
is an array implementation of the
SortedSet
interface. This implementation has
significantly lower memory overhead than TreeSet
(about 4 bytes per element vs. 40 bytes per element) and is
intended to be a replacement for the use of TreeSet
for sets containing under 3000 elements.
The main drawback of the array implementation is its worst-case performance characteristics when adding or removing elements in reverse sorted order.
This implementation does not support null
elements.
Constructor Summary | |
---|---|
ArraySortedSet()
Construct a new ArraySortedSet of default size, using
the default sorting order of the objects added to the set. |
|
ArraySortedSet(java.util.Collection<? extends E> initialContents,
java.util.Comparator<? super E> comparator)
Construct a new ArraySortedSet with the given contents
and comparator. |
|
ArraySortedSet(java.util.Comparator<? super E> comparator)
Construct a new ArraySortedSet of default size, using
the specified comparator. |
|
ArraySortedSet(E[] initialContents,
java.util.Comparator<? super E> comparator)
Construct a new ArraySortedSet with the given contents
and comparator. |
|
ArraySortedSet(int initialSize)
Construct a new ArraySortedSet of specified size, using
the default sorting order of the objects addded to the set. |
|
ArraySortedSet(int initialSize,
java.util.Comparator<? super E> comparator)
Construct a new ArraySortedSet of specified size, using
the specified comparator. |
Method Summary | |
---|---|
protected ArraySortedSet<E> |
newArraySortedSet(int initialSize,
java.util.Comparator<? super E> comparator)
|
Methods inherited from class oracle.javatools.util.ArraySortedSet |
---|
add, addAll, clear, clone, comparator, contains, first, headSet, intern, isEmpty, iterator, last, lookup, remove, size, subSet, tailSet, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, containsAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
addAll, containsAll, equals, hashCode, removeAll, retainAll |
Constructor Detail |
---|
public ArraySortedSet()
ArraySortedSet
of default size, using
the default sorting order of the objects added to the set.
public ArraySortedSet(int initialSize)
ArraySortedSet
of specified size, using
the default sorting order of the objects addded to the set.
initialSize
- the initial capacity of the setpublic ArraySortedSet(java.util.Comparator<? super E> comparator)
ArraySortedSet
of default size, using
the specified comparator.
comparator
- the comparator to usepublic ArraySortedSet(int initialSize, java.util.Comparator<? super E> comparator)
ArraySortedSet
of specified size, using
the specified comparator.
initialSize
- the initial capacity of the setcomparator
- the comparator to usepublic ArraySortedSet(E[] initialContents, java.util.Comparator<? super E> comparator)
ArraySortedSet
with the given contents
and comparator. All objects in the array will be added to the set.
initialContents
- the initial contents to add to the setcomparator
- the comparator to usepublic ArraySortedSet(java.util.Collection<? extends E> initialContents, java.util.Comparator<? super E> comparator)
ArraySortedSet
with the given contents
and comparator. All objects in the collection will be added to the set.
initialContents
- the initial contents to add to the setcomparator
- the comparator to use.Method Detail |
---|
protected ArraySortedSet<E> newArraySortedSet(int initialSize, java.util.Comparator<? super E> comparator)
newArraySortedSet
in class ArraySortedSet<E>
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |