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
FieldsFields inherited from class org.eclipse.cdt.core.parser.util.ObjectTable
keyTableFields inherited from class org.eclipse.cdt.core.parser.util.HashTable
currEntry, hashTable, minHashSize, nextTable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds each item in the list to this ObjectSet, or no-ops if list is nullvoidAdds each item in the specified ObjectSet, or no-ops if the set is nullvoidAdds each of the items in the specified array, or no-ops if the array is nullvoidAdds the specified item to the set, or no-ops if the key is nullstatic <T> ObjectSet<T> emptySet()voidAdds the specified item to the setbooleanRemove 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, toStringMethods inherited from class org.eclipse.cdt.core.parser.util.HashTable
capacity, countCollisions, dumpNexts, isEmpty, linkIntoHashTable, partition, rehash, removeEntry, resize, size, sortMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-