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

Constructor Index

 o Set()
Constructs an empty set.
 o Set(int)
Constructs an empty set with the specified initial capacity.
 o Set(int, float)
Constructs an empty set with the specified initial capacity and load factor.

Method Index

 o add(Object)
Adds the object to this set.
 o add(Set)
Adds the all components of the set to this set.
 o addElement(Object)
Adds the object to this set.
 o contains(Object)
Tests if the specified value in this set.
 o elements()
Returns an enumeration of the values in this set.
 o removeAllElements()
Removes all components from this array and sets its length to zero.
 o removeElement(Object)
Removes the object from this set.

Constructors

 o Set
 public Set()
Constructs an empty set.

 o Set
 public Set(int initialCapacity)
Constructs an empty set with the specified initial capacity.

Parameters:
initialCapacity - the initial capacity of the set.
 o 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.

Methods

 o 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
 o 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
 o 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
 o 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
 o 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.
 o removeElement
 public void removeElement(Object obj)
Removes the object from this set.

Parameters:
obj - an object.
See Also:
remove
 o 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