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.
modCount| Constructor and Description |
|---|
StringHashedSet() |
StringHashedSet(Collection<E> c) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E elem) |
boolean |
contains(Object elem) |
E |
get(Object elem) |
addAll, addAll, clear, clone, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, clear, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamcontainsAll, equals, hashCodepublic StringHashedSet()
public StringHashedSet(Collection<E> c)
Copyright © 2016. All Rights Reserved.