public class LinearSet<E> extends AbstractSet<E> implements Cloneable, Serializable
LinearSet is a simplistic light-weight
Set designed for use when the number of entries is
small. It is backed by a List.| Constructor and Description |
|---|
LinearSet()
Creates a
LinearSet. |
LinearSet(Collection<? extends E> c)
Creates a
LinearSet, filling it with the elements
of the given collection. |
LinearSet(int capacity)
Creates a
LinearSet with given capacity. |
LinearSet(ListFactory<E> lf)
|
LinearSet(ListFactory<E> lf,
int capacity)
|
LinearSet(ListFactory<E> lf,
Set<? extends E> set)
|
LinearSet(Set<? extends E> set)
Creates a
LinearSet, filling it with the elements
of set. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
boolean |
addAll(Collection<? extends E> c) |
LinearSet<E> |
clone() |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAllclear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclear, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic LinearSet()
public LinearSet(int capacity)
public LinearSet(Collection<? extends E> c)
public LinearSet(ListFactory<E> lf)
public LinearSet(ListFactory<E> lf, int capacity)
public LinearSet(ListFactory<E> lf, Set<? extends E> set)
public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public boolean add(E o)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>Copyright (c) 2006 C. Scott Ananian