Package org.eclipse.cdt.core.parser.util
Class ObjectSet<T>
java.lang.Object
org.eclipse.cdt.core.parser.util.HashTable
org.eclipse.cdt.core.parser.util.ObjectTable<T>
org.eclipse.cdt.core.parser.util.ObjectSet<T>
- Restriction:
- This class is not intended to be subclassed by clients.
-
Field Summary
Fields inherited from class org.eclipse.cdt.core.parser.util.ObjectTable
keyTable
Fields inherited from class org.eclipse.cdt.core.parser.util.HashTable
currEntry, hashTable, minHashSize, nextTable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds each item in the list to this ObjectSet, or no-ops if list is nullvoid
Adds each item in the specified ObjectSet, or no-ops if the set is nullvoid
Adds each of the items in the specified array, or no-ops if the array is nullvoid
Adds the specified item to the set, or no-ops if the key is nullstatic <T> ObjectSet<T>
emptySet()
void
Adds the specified item to the setboolean
Remove the specified object from this ObjectSetMethods inherited from class org.eclipse.cdt.core.parser.util.ObjectTable
add, clear, clone, containsKey, hash, isEquivalent, iterator, keyArray, keyArray, keyAt, lookup, removeEntry, resize, toList, toString
Methods inherited from class org.eclipse.cdt.core.parser.util.HashTable
capacity, countCollisions, dumpNexts, isEmpty, linkIntoHashTable, partition, rehash, removeEntry, resize, size, sort
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY_SET
An empty immutableObjectSet
.
-
-
Constructor Details
-
ObjectSet
public ObjectSet(int initialSize) Constructs an empty ObjectSet, allocating an initial storage for the specified number of elements- Parameters:
initialSize
-
-
ObjectSet
Constructs an ObjectSet populated with the specified items, or an empty ObjectSet if the parameter is null- Parameters:
items
-
-
-
Method Details
-
emptySet
- Since:
- 5.1
-
checkPut
Adds the specified item to the set, or no-ops if the key is null- Parameters:
key
- the item to add (may be null)
-
put
Adds the specified item to the set- Parameters:
key
- the (non-null) object to store
-
addAll
Adds each item in the list to this ObjectSet, or no-ops if list is null- Parameters:
list
- a list (may be null)
-
addAll
Adds each item in the specified ObjectSet, or no-ops if the set is null- Parameters:
set
- a set (may be null)
-
addAll
Adds each of the items in the specified array, or no-ops if the array is null- Parameters:
objs
- an array (may be null)
-
remove
Remove the specified object from this ObjectSet- Parameters:
key
- the (non-null) object to remove- Returns:
- whether an object was removed
-