All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.util.Set
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----jp.kyasu.util.Set
- public class Set
- extends Hashtable
The Set
implements a collection of components that
are not duplicated.
- Version:
- 23 Sep 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- Hashtable
-
Set()
- Constructs an empty set.
-
Set(int)
- Constructs an empty set with the specified initial capacity.
-
Set(int, float)
- Constructs an empty set with the specified initial capacity
and load factor.
-
add(Object)
- Adds the object to this set.
-
add(Set)
- Adds the all components of the
set
to this set.
-
addElement(Object)
- Adds the object to this set.
-
contains(Object)
- Tests if the specified value in this set.
-
elements()
- Returns an enumeration of the values in this set.
-
removeAllElements()
- Removes all components from this array and sets its length to zero.
-
removeElement(Object)
- Removes the object from this set.
Set
public Set()
- Constructs an empty set.
Set
public Set(int initialCapacity)
- Constructs an empty set with the specified initial capacity.
- Parameters:
- initialCapacity - the initial capacity of the set.
Set
public Set(int initialCapacity,
float loadFactor)
- Constructs an empty set with the specified initial capacity
and load factor.
- Parameters:
- initialCapacity - the initial capacity of the set.
- loadFactor - a number between 0.0 and 1.0.
elements
public Enumeration elements()
- Returns an enumeration of the values in this set.
- Returns:
- an enumeration of the values in this set.
- Overrides:
- elements in class Hashtable
- See Also:
- Enumeration, keys
contains
public boolean contains(Object obj)
- Tests if the specified value in this set.
- Returns:
-
true
if the value
argument
in this set; false
otherwise.
- Overrides:
- contains in class Hashtable
- See Also:
- containsKey
add
public void add(Object obj)
- Adds the object to this set. If this set already contains
the object, the object is not added.
- Parameters:
- obj - an object.
- See Also:
- addElement
addElement
public void addElement(Object obj)
- Adds the object to this set. If this set already contains
the object, the object is not added.
- Parameters:
- obj - an object.
- See Also:
- put
add
public synchronized void add(Set set)
- Adds the all components of the
set
to this set.
If this set already contains the component to be added,
the component is not added.
- Parameters:
- set - a set.
removeElement
public void removeElement(Object obj)
- Removes the object from this set.
- Parameters:
- obj - an object.
- See Also:
- remove
removeAllElements
public void removeAllElements()
- Removes all components from this array and sets its length to zero.
- See Also:
- clear
All Packages Class Hierarchy This Package Previous Next Index