com.thoughtworks.xstream.core.util
Class PresortedSet

java.lang.Object
  extended by com.thoughtworks.xstream.core.util.PresortedSet
All Implemented Interfaces:
Iterable, Collection, Set, SortedSet

public class PresortedSet
extends Object
implements SortedSet

Author:
Jörg Schaible

Constructor Summary
PresortedSet()
           
PresortedSet(Comparator comparator)
           
PresortedSet(Comparator comparator, Collection c)
           
 
Method Summary
 boolean add(Object e)
           
 boolean addAll(Collection c)
           
 void clear()
           
 Comparator comparator()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection c)
           
 boolean equals(Object o)
           
 Object first()
           
 int hashCode()
           
 SortedSet headSet(Object toElement)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 Object last()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
 int size()
           
 List subList(int fromIndex, int toIndex)
           
 SortedSet subSet(Object fromElement, Object toElement)
           
 SortedSet tailSet(Object fromElement)
           
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresortedSet

public PresortedSet()

PresortedSet

public PresortedSet(Comparator comparator)

PresortedSet

public PresortedSet(Comparator comparator,
                    Collection c)
Method Detail

add

public boolean add(Object e)
Specified by:
add in interface Collection
Specified by:
add in interface Set

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Collection
Specified by:
addAll in interface Set

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Set

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection
Specified by:
contains in interface Set

containsAll

public boolean containsAll(Collection c)
Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface Set

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection
Specified by:
equals in interface Set
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection
Specified by:
hashCode in interface Set
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface Set

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface Set

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection
Specified by:
remove in interface Set

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface Set

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface Set

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface Set

subList

public List subList(int fromIndex,
                    int toIndex)

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

toArray

public Object[] toArray(Object[] a)
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set

comparator

public Comparator comparator()
Specified by:
comparator in interface SortedSet

first

public Object first()
Specified by:
first in interface SortedSet

headSet

public SortedSet headSet(Object toElement)
Specified by:
headSet in interface SortedSet

last

public Object last()
Specified by:
last in interface SortedSet

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)
Specified by:
subSet in interface SortedSet

tailSet

public SortedSet tailSet(Object fromElement)
Specified by:
tailSet in interface SortedSet


Copyright © 2012. All Rights Reserved.