net.mazewar
Class SortedMultiSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList
                  extended by net.mazewar.SortedMultiSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Deque, java.util.List, java.util.Queue, java.util.Set, java.util.SortedSet

public class SortedMultiSet
extends java.util.LinkedList
implements java.util.SortedSet

An implementation of the SortedSet interface that allows multiple "equivalent" objects to be stored, unlike TreeSet.

Version:
$Id: SortedMultiSet.java 350 2004-01-24 05:31:17Z geoffw $
Author:
Geoffrey Washburn <geoffw@cis.upenn.edu>
See Also:
Serialized Form

Constructor Summary
SortedMultiSet()
           
SortedMultiSet(java.util.Collection c)
           
SortedMultiSet(java.util.Comparator c)
           
SortedMultiSet(java.util.SortedSet s)
           
 
Method Summary
 boolean add(java.lang.Object o1)
           
 boolean addAll(java.util.Collection c)
           
 java.util.Comparator comparator()
           
 boolean containsAll(java.util.Collection c)
           
 java.lang.Object first()
           
 java.util.SortedSet headSet(java.lang.Object toElement)
           
 java.lang.Object last()
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 java.util.SortedSet subSet(java.lang.Object fromElement, java.lang.Object toElement)
           
 java.util.SortedSet tailSet(java.lang.Object fromElement)
           
 
Methods inherited from class java.util.LinkedList
add, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
isEmpty, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
clear, contains, equals, hashCode, isEmpty, iterator, remove, size, toArray, toArray
 
Methods inherited from interface java.util.List
equals, hashCode, isEmpty, iterator, listIterator, subList
 
Methods inherited from interface java.util.Deque
iterator
 

Constructor Detail

SortedMultiSet

public SortedMultiSet()

SortedMultiSet

public SortedMultiSet(java.util.Collection c)

SortedMultiSet

public SortedMultiSet(java.util.Comparator c)

SortedMultiSet

public SortedMultiSet(java.util.SortedSet s)
Method Detail

add

public boolean add(java.lang.Object o1)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.Deque
Specified by:
add in interface java.util.List
Specified by:
add in interface java.util.Queue
Specified by:
add in interface java.util.Set
Overrides:
add in class java.util.LinkedList

addAll

public boolean addAll(java.util.Collection c)
Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Specified by:
addAll in interface java.util.Set
Overrides:
addAll in class java.util.LinkedList

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.Collection
Specified by:
containsAll in interface java.util.List
Specified by:
containsAll in interface java.util.Set
Overrides:
containsAll in class java.util.AbstractCollection

comparator

public java.util.Comparator comparator()
Specified by:
comparator in interface java.util.SortedSet

first

public java.lang.Object first()
Specified by:
first in interface java.util.SortedSet

last

public java.lang.Object last()
Specified by:
last in interface java.util.SortedSet

headSet

public java.util.SortedSet headSet(java.lang.Object toElement)
Specified by:
headSet in interface java.util.SortedSet

subSet

public java.util.SortedSet subSet(java.lang.Object fromElement,
                                  java.lang.Object toElement)
Specified by:
subSet in interface java.util.SortedSet

tailSet

public java.util.SortedSet tailSet(java.lang.Object fromElement)
Specified by:
tailSet in interface java.util.SortedSet

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection
Specified by:
removeAll in interface java.util.List
Specified by:
removeAll in interface java.util.Set
Overrides:
removeAll in class java.util.AbstractCollection

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection
Specified by:
retainAll in interface java.util.List
Specified by:
retainAll in interface java.util.Set
Overrides:
retainAll in class java.util.AbstractCollection