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

brutil
Class AbstractSortedMultiSet

java.lang.Object
  |
  +--brutil.AbstractListing
        |
        +--brutil.AbstractMultiSet
              |
              +--brutil.AbstractSortedMultiSet
All Implemented Interfaces:
Collection, MultiSet, Set, SortedMultiSet, SortedSet
Direct Known Subclasses:
AbstractSortedSet

public abstract class AbstractSortedMultiSet
extends AbstractMultiSet
implements SortedMultiSet


Fields inherited from class brutil.AbstractListing
list
 
Constructor Summary
AbstractSortedMultiSet()
           
 
Method Summary
 java.lang.Object add(java.lang.Object elt)
          Add the specified object to the Set.
 java.lang.Object find(java.lang.Object elt)
           
 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 elt)
          Returns the greatest element that is less that the specified element.
 
Methods inherited from class brutil.AbstractMultiSet
contains, iterator, numOccurences, remove, removeAll
 
Methods inherited from class brutil.AbstractListing
clear, isEmpty, listFactory, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface brutil.MultiSet
numOccurences, removeAll
 
Methods inherited from interface brutil.Set
contains, isEmpty, iterator, remove
 
Methods inherited from interface brutil.Collection
clear, size
 

Constructor Detail

AbstractSortedMultiSet

public AbstractSortedMultiSet()
Method Detail

find

public java.lang.Object find(java.lang.Object elt)
Specified by:
find in interface Set
Overrides:
find in class AbstractMultiSet
Following copied from interface: brutil.Set
Returns:
the contained item that matches the parameter with respect to its .equals()

add

public java.lang.Object add(java.lang.Object elt)
Add the specified object to the Set. Unless the implementing class is also a MultiSet, there may only be one instance of the object in the set.
Specified by:
add in interface Set
Overrides:
add in class AbstractMultiSet
Parameters:
o - The object to add to the Set.
Returns:
Object inserted into the set.

minElement

public java.lang.Object minElement()
Returns the minimum element in the Set.
Specified by:
minElement in interface SortedSet
Returns:
the minimum element

maxElement

public java.lang.Object maxElement()
Returns the maximum element in the Set.
Specified by:
maxElement in interface SortedSet
Returns:
the maximum element

prevElement

public java.lang.Object prevElement(java.lang.Object elt)
Returns the greatest element that is less that the specified element.
Specified by:
prevElement in interface SortedSet
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.
Specified by:
nextElement in interface SortedSet
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.