ch.javasoft.util.intcoll
Interface SortedIntSet

All Superinterfaces:
Collection<Integer>, IntCollection, IntIterable, IntSet, Iterable<Integer>, Set<Integer>, SortedSet<Integer>
All Known Implementing Classes:
AbstractSortedIntSet, BitSetIntSet, DefaultIntSet, RangeIntSet

public interface SortedIntSet
extends IntSet, SortedSet<Integer>

The SortedIntSet ... TODO javadoc-SortedIntSet-type


Method Summary
 SortedIntSet headSet(int toElement)
          Returns a view of the portion of this set whose elements are strictly less than toElement.
 SortedIntSet headSet(Integer toElement)
           
 SortedIntSet subSet(Integer fromElement, Integer toElement)
           
 SortedIntSet subSet(int fromElement, int toElement)
          Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
 SortedIntSet tailSet(int fromElement)
          Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
 SortedIntSet tailSet(Integer fromElement)
           
 
Methods inherited from interface ch.javasoft.util.intcoll.IntCollection
addAll, addAll, addInt, containsInt, intIterator, removeInt, toIntArray, toIntArray
 
Methods inherited from interface java.util.SortedSet
comparator, first, last
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

subSet

SortedIntSet subSet(int fromElement,
                    int toElement)
Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters:
fromElement - low endpoint (inclusive) of the returned set
toElement - high endpoint (exclusive) of the returned set
Returns:
a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive
Throws:
IllegalArgumentException - if fromElement is greater than toElement; or if this set itself has a restricted range, and fromElement or toElement lies outside the bounds of the range

subSet

SortedIntSet subSet(Integer fromElement,
                    Integer toElement)
Specified by:
subSet in interface SortedSet<Integer>

headSet

SortedIntSet headSet(int toElement)
Returns a view of the portion of this set whose elements are strictly less than toElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters:
toElement - high endpoint (exclusive) of the returned set
Returns:
a view of the portion of this set whose elements are strictly less than toElement
Throws:
IllegalArgumentException - if this set itself has a restricted range, and toElement lies outside the bounds of the range

headSet

SortedIntSet headSet(Integer toElement)
Specified by:
headSet in interface SortedSet<Integer>

tailSet

SortedIntSet tailSet(int fromElement)
Returns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Parameters:
fromElement - low endpoint (inclusive) of the returned set
Returns:
a view of the portion of this set whose elements are greater than or equal to fromElement
Throws:
IllegalArgumentException - if this set itself has a restricted range, and fromElement lies outside the bounds of the range

tailSet

SortedIntSet tailSet(Integer fromElement)
Specified by:
tailSet in interface SortedSet<Integer>