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

brutil
Class AbstractSortedList

java.lang.Object
  |
  +--brutil.AbstractListing
        |
        +--brutil.AbstractMultiSet
              |
              +--brutil.AbstractSet
                    |
                    +--brutil.AbstractSortedList
All Implemented Interfaces:
Collection, MultiSet, Set

public abstract class AbstractSortedList
extends AbstractSet
implements MultiSet


Fields inherited from class brutil.AbstractListing
list
 
Constructor Summary
AbstractSortedList()
           
 
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)
           
 int numOccurences(java.lang.Object elt)
          Return the number of times the specified object occurs in the set.
 boolean removeAll(java.lang.Object elt)
          Remove all instances of specified object from the MultiSet
 
Methods inherited from class brutil.AbstractMultiSet
contains, iterator, remove
 
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.Set
contains, isEmpty, iterator, remove
 
Methods inherited from interface brutil.Collection
clear, size
 

Constructor Detail

AbstractSortedList

public AbstractSortedList()
Method Detail

find

public java.lang.Object find(java.lang.Object elt)
Specified by:
find in interface Set
Overrides:
find in class AbstractMultiSet
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 AbstractSet
Parameters:
o - The object to add to the Set.
Returns:
Object inserted into the set.

numOccurences

public int numOccurences(java.lang.Object elt)
Return the number of times the specified object occurs in the set.
Specified by:
numOccurences in interface MultiSet
Overrides:
numOccurences in class AbstractMultiSet
Parameters:
o - The object to find the number of instance to
Returns:
number of instances of the specified object.

removeAll

public boolean removeAll(java.lang.Object elt)
Remove all instances of specified object from the MultiSet
Specified by:
removeAll in interface MultiSet
Overrides:
removeAll in class AbstractMultiSet
Parameters:
o - The object to remove.
Returns:
true if the object was in the set, false otherwise.


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