ariba.util.core
Class MapBasedSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet
          extended by ariba.util.core.MapBasedSet
All Implemented Interfaces:
Cloneable, Iterable, Collection, Set
Direct Known Subclasses:
GrowOnlyHashSet

public abstract class MapBasedSet
extends AbstractSet
implements Cloneable

A generic implementation of the Set built on top of a Map. This implementation allows building of a GrowOnlyHashSet on top of a GrowOnlyHashTable. This code is almost an exact copy of java.util.TreeSet which builds on top of java.util.TreeMap


Method Summary
 boolean add(Object o)
           
 void clear()
           
 Object clone()
          Returns a shallow copy of this TreeSet instance.
 boolean contains(Object o)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object o)
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, retainAll, toArray, toArray
 

Method Detail

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

size

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

isEmpty

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

contains

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

add

public boolean add(Object o)
Specified by:
add in interface Collection
Specified by:
add in interface Set
Overrides:
add 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

clear

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

clone

public Object clone()
Returns a shallow copy of this TreeSet instance. (The elements themselves are not cloned.)

Overrides:
clone in class Object
Returns:
a shallow copy of this set.


AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.