nl.knowledgeplaza.util
Class SortedSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet
nl.knowledgeplaza.util.SortedSet
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, Set
public class SortedSet
- extends AbstractSet
- implements Cloneable, Serializable
SortedSet is a simplistic light-weight
Set designed for use when the number of entries is
small. It is backed by a List.
Unlike TreeSet it allows NULL to be added
- Version:
- $Revision: 1.2 $
- Author:
- $Author: toeukpap $
- See Also:
- Serialized Form
SortedSet
public SortedSet()
- Creates a
LinearSet. Uses an
ArrayList as the backing store.
SortedSet
public SortedSet(Comparator comparator)
- Creates a
LinearSet. Uses an
ArrayList as the backing store.
SortedSet
public SortedSet(int capacity)
- Creates a
LinearSet with given capacity.
Uses an ArrayList as the backing store.
SortedSet
public SortedSet(Collection collection)
- Creates a
LinearSet, filling it with the elements
of set. Uses an ArrayList as the
backing store.
add
public boolean add(int pos,
Object o)
add
public boolean add(Object o)
- Specified by:
add in interface Collection- Specified by:
add in interface Set- Overrides:
add in class AbstractCollection
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface Set- Overrides:
addAll in class AbstractCollection
clone
public Object clone()
- Overrides:
clone in class Object
get
public Object get(int pos)
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface Set- Specified by:
iterator in class AbstractCollection
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection- Specified by:
remove in interface Set- Overrides:
remove in class AbstractCollection
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface Set- Specified by:
size in class AbstractCollection
Copyright © 2012 KnowledgePlaza. All Rights Reserved.