|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaggregate.AbstractCollection<E> jaggregate.AbstractExtensibleCollection<E> jaggregate.SortedCollection<E> jaggregate.NaturallySortedCollection<E>
E
- a restriction on the types of elements that may be included in the
collectionpublic class NaturallySortedCollection<E extends Comparable<? super E>>
Represents a variable-sized collection of objects whose elements are ordered based on
the natural ordering of its elements, as defined by the interface Comparable
.
Elements may be added, removed, or inserted, and can be accessed using external
integer keys.
Constructor Summary | |
---|---|
NaturallySortedCollection()
Creates an empty naturally sorted collection. |
|
NaturallySortedCollection(Collection<? extends E> newElements)
Creates a naturally sorted collection containing the elements from the given collection. |
|
NaturallySortedCollection(E... newElements)
Creates a naturally sorted collection containing the elements from the given array. |
|
NaturallySortedCollection(Iterable<? extends E> newElements)
Creates a naturally sorted collection containing the elements from the given iterable. |
Method Summary | ||
---|---|---|
static
|
emptyNaturallySortedCollection()
Creates an empty naturally sorted collection. |
|
static
|
naturallySortedCollectionFrom(Collection<? extends T> newElements)
Creates a naturally sorted collection containing the elements from the given collection. |
|
static
|
naturallySortedCollectionFrom(Iterable<? extends T> newElements)
Creates a naturally sorted collection containing the elements from the given iterable. |
|
static
|
naturallySortedCollectionWith(T... newElements)
Creates a naturally sorted collection containing the elements from the given array. |
Methods inherited from class jaggregate.SortedCollection |
---|
add, after, at, before, collect, comparator, concat, copyRange, copyWith, copyWithout, doWithIndex, doWithOthers, emptySortedCollection, equals, findFirst, findLast, first, forEachDo, forEachInRangeDo, forEachInRangeDoWithIndex, forEachInReverseDo, hashCode, indexOf, indexOf, last, reject, remove, removeAt, removeFirst, removeIf, removeLast, retainIf, reverse, select, size, sortedCollectionFrom, sortedCollectionFrom, sortedCollectionWith, toSortedCollection, toString |
Methods inherited from class jaggregate.AbstractExtensibleCollection |
---|
addAll, addAll, addAll, addAll, removeAll, removeAll, removeAll, removeAll, retainAll, retainAll, retainAll, retainAll |
Methods inherited from class jaggregate.AbstractCollection |
---|
allSatisfy, anySatisfy, detect, includes, inject, isEmpty, occurrencesOf, rehash, toArray, toArray, toBag, toIdentityBag, toIdentitySet, toOrderedCollection, toSet, toSortedCollection |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jaggregate.Collection |
---|
allSatisfy, anySatisfy, detect, includes, inject, isEmpty, occurrencesOf, rehash, toArray, toArray, toBag, toIdentityBag, toIdentitySet, toOrderedCollection, toSet, toSortedCollection |
Methods inherited from interface jaggregate.Collection |
---|
allSatisfy, anySatisfy, detect, includes, inject, isEmpty, occurrencesOf, rehash, toArray, toArray, toBag, toIdentityBag, toIdentitySet, toOrderedCollection, toSet, toSortedCollection |
Constructor Detail |
---|
public NaturallySortedCollection()
public NaturallySortedCollection(Collection<? extends E> newElements)
newElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
public NaturallySortedCollection(E... newElements)
newElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
public NaturallySortedCollection(Iterable<? extends E> newElements)
newElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
Method Detail |
---|
public static <T extends Comparable<? super T>> NaturallySortedCollection<T> emptyNaturallySortedCollection()
T
- the type of elements to add to the new sorted collection
public static <T extends Comparable<? super T>> NaturallySortedCollection<T> naturallySortedCollectionFrom(Collection<? extends T> newElements)
T
- the type of elements to add to the new sorted collectionnewElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
public static <T extends Comparable<? super T>> NaturallySortedCollection<T> naturallySortedCollectionWith(T... newElements)
T
- the type of elements to add to the new sorted collectionnewElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
public static <T extends Comparable<? super T>> NaturallySortedCollection<T> naturallySortedCollectionFrom(Iterable<? extends T> newElements)
T
- the type of elements to add to the new sorted collectionnewElements
- the elements to add to the new collection
NullPointerException
- if newElements
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |