Uses of Class
jaggregate.SortedCollection

Packages that use SortedCollection
jaggregate Jaggregate is a J2SE 5.0-aware collections library that is modeled after the ANSI Smalltalk collection protocols. 
 

Uses of SortedCollection in jaggregate
 

Subclasses of SortedCollection in jaggregate
 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.
 

Methods in jaggregate that return SortedCollection
 SortedCollection<E> SortedCollection.concat(ReadOnlySequence<? extends E> otherSequence)
          Answers a new sequence containing all of this sequence's elements in their original order followed by all of the elements of the given sequence, in their original order.

Since this collection sorts its elements, the result will also be sorted as defined by this collection's comparator.

 SortedCollection<E> SortedCollection.copyRange(int start, int stop)
          Answers a new sequence containing the specified range of elements of this sequence in their original order.
 SortedCollection<E> SortedCollection.copyWith(E newElement)
          Answers a new sequence with size one greater than the size of this sequence, containing the elements of this sequence and a given new element placed at the end.
 SortedCollection<E> SortedCollection.copyWithout(E oldElement)
          Answers a new sequence with all of the elements of this sequence that are not equivalent to the given element, in their original order.
static
<T> SortedCollection<T>
SortedCollection.emptySortedCollection(Comparator<? super T> comparator)
          Creates an empty sorted collection whose elements are sorted using the given comparator.
 SortedCollection<E> SortedCollection.reject(UnaryCondition<? super E> discriminator)
          Answers a new collection which contains only the elements in this collection which cause the given discriminator to answer false.

For each element of this collection, discriminator is evaluated with the element as the parameter. Each element which causes discriminator to answer false is included in the new collection.

The elements are traversed in the order specified by forEachDo for this collection.

Unless specifically refined, this message is defined to answer an object conforming to the same protocol as this collection. If both this collection and the result maintain an ordering of their elements, the elements of the result will be in the same relative order as the elements of this collection.

 SortedCollection<E> SortedCollection.select(UnaryCondition<? super E> discriminator)
          Answers a new collection which contains only the elements in this collection which cause the given discriminator to answer true.

For each element of this collection, discriminator is evaluated with the element as the parameter. Each element which causes discriminator to answer true is included in the new collection.

The elements are traversed in order specified by forEachDo for this collection.

Unless specifically refined, this message is defined to answer an object conforming to the same protocol as this collection. If both this collection and the result maintain an ordering of their elements, the elements of the result will be in the same relative order as the elements of this collection.

static
<T> SortedCollection<T>
SortedCollection.sortedCollectionFrom(Comparator<? super T> comparator, Collection<? extends T> newElements)
          Creates a sorted collection whose elements are sorted using the given comparator, and containing the elements of the given collection.
static
<T> SortedCollection<T>
SortedCollection.sortedCollectionFrom(Comparator<? super T> comparator, Iterable<? extends T> newElements)
          Creates a sorted collection whose elements are sorted using the given comparator, and containing the elements of the given iterable.
static
<T> SortedCollection<T>
SortedCollection.sortedCollectionWith(Comparator<? super T> comparator, T... newElements)
          Creates a sorted collection whose elements are sorted using the given comparator, and containing the elements of the given array.
 SortedCollection<E> SortedCollection.toSortedCollection()
          Answers a sorted collection with the same elements as this collection. If this collection has established an ordering on its elements, then that ordering is used in the answer. Otherwise, order of the elements is arbitrary--in such a case, one should probably use the overload of this method that accepts a comparator.

Answers self.

 SortedCollection<E> Collection.toSortedCollection()
          Answers a sorted collection with the same elements as this collection.
 SortedCollection<E> AbstractCollection.toSortedCollection()
          Answers a sorted collection with the same elements as this collection.
 SortedCollection<E> Collection.toSortedCollection(Comparator<? super E> comparator)
          Answers a sorted collection with the same elements as this collection, using the given comparator to order the elements.
 SortedCollection<E> AbstractCollection.toSortedCollection(Comparator<? super E> comparator)
          Answers a sorted collection with the same elements as this collection, using the given comparator to order the elements.
 



© Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved. Licensed under the Academic Free License version 3.0. pholser@alumni.rice.edu