BRUtil - Making Java a Kinder, Gentler, Place to be.

brutil
Interface SortedSet

All Superinterfaces:
Collection, Set
All Known Subinterfaces:
SortedMultiSet
All Known Implementing Classes:
AbstractSortedSet, RBSet

public interface SortedSet
extends Set


Method Summary
 java.lang.Object maxElement()
          Returns the maximum element in the Set.
 java.lang.Object minElement()
          Returns the minimum element in the Set.
 java.lang.Object nextElement(java.lang.Object elt)
          Returns the lowest element that is greater that the specified element.
 java.lang.Object prevElement(java.lang.Object element)
          Returns the greatest element that is less that the specified element.
 
Methods inherited from interface brutil.Set
add, contains, find, isEmpty, iterator, remove
 
Methods inherited from interface brutil.Collection
clear, size
 

Method Detail

minElement

public java.lang.Object minElement()
Returns the minimum element in the Set.
Returns:
the minimum element

maxElement

public java.lang.Object maxElement()
Returns the maximum element in the Set.
Returns:
the maximum element

prevElement

public java.lang.Object prevElement(java.lang.Object element)
Returns the greatest element that is less that the specified element.
Parameters:
element - Comparable object for which to find the previous element.
Returns:
the greatest element that is less that the specified element.
Throws:
ClassCastException - element is not Comparable

nextElement

public java.lang.Object nextElement(java.lang.Object elt)
Returns the lowest element that is greater that the specified element.
Parameters:
element - Comparable object for which to find the next element.
Returns:
the lowest element that is greater that the specified element.
Throws:
ClassCastException - element is not Comparable


BRUtil - Making Java a Kinder, Gentler, Place to be.