public class Set
extends java.util.Hashtable
Set implements a collection of components that
are not duplicated.Hashtable,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected static java.lang.Object |
Value
The dummy value.
|
| コンストラクタと説明 |
|---|
Set()
Constructs an empty set.
|
Set(int initialCapacity)
Constructs an empty set with the specified initial capacity.
|
Set(int initialCapacity,
float loadFactor)
Constructs an empty set with the specified initial capacity
and load factor.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
add(java.lang.Object obj)
Adds the object to this set.
|
void |
add(Set set)
Adds the all components of the
set to this set. |
void |
addElement(java.lang.Object obj)
Adds the object to this set.
|
boolean |
contains(java.lang.Object obj)
Tests if the specified value in this set.
|
java.util.Enumeration |
elements()
Returns an enumeration of the values in this set.
|
void |
removeAllElements()
Removes all components from this array and sets its length to zero.
|
void |
removeElement(java.lang.Object obj)
Removes the object from this set.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, valuespublic Set()
public Set(int initialCapacity)
initialCapacity - the initial capacity of the set.public Set(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the set.loadFactor - a number between 0.0 and 1.0.public java.util.Enumeration elements()
elements クラス内 java.util.HashtableEnumeration,
Hashtable.keys()public boolean contains(java.lang.Object obj)
contains クラス内 java.util.Hashtabletrue if the value argument
in this set; false otherwise.Hashtable.containsKey(java.lang.Object)public void add(java.lang.Object obj)
obj - an object.addElement(java.lang.Object)public void addElement(java.lang.Object obj)
obj - an object.Hashtable.put(java.lang.Object, java.lang.Object)public void add(Set set)
set to this set.
If this set already contains the component to be added,
the component is not added.set - a set.public void removeElement(java.lang.Object obj)
obj - an object.Hashtable.remove(java.lang.Object)public void removeAllElements()
Hashtable.clear()