public class StringHashedSet<E> extends ArraySet<E>
The contains(Object elem)
and get(Object elem)
methods can be called with Strings as elem
parameter.
For get(Object elem)
, the object that has been added
is returned, and not its String representation.
Though it's possible to store Strings as objects in this class, it doesn't make sense as you could use ArraySet for that equally well.
You shouldn't use the ArrayList specific functions like those that take index parameters.
It is not possible to add null
elements.
Constructor and Description |
---|
StringHashedSet() |
StringHashedSet(java.util.Collection<E> c) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E elem) |
boolean |
contains(java.lang.Object elem) |
E |
get(java.lang.Object elem) |
addAll, addAll, clear, clone, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize