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:
java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Set
Direct Known Subclasses:
GrowOnlyHashSet

public abstract class MapBasedSet
extends java.util.AbstractSet
implements java.lang.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(java.lang.Object o)
           
 void clear()
           
 java.lang.Object clone()
          Returns a shallow copy of this TreeSet instance.
 boolean contains(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 boolean remove(java.lang.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 java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.Set
Specified by:
iterator in class java.util.AbstractCollection

size

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

isEmpty

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

contains

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

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.Set
Overrides:
add in class java.util.AbstractCollection

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.Set
Overrides:
remove in class java.util.AbstractCollection

clear

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

clone

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

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


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