public class LinkedSet<T> extends Object implements Set<T>
Constructor and Description |
---|
LinkedSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
boolean |
addAll(Collection<? extends T> c)
Adds all objects in the given collection to this set
|
void |
addSet(LinkedSet<T> set)
Sets up the constraint that the given set is a subset of this set
|
void |
clear()
Removes all objects from this set.
|
boolean |
contains(Object obj)
Returns true iff the element is contained in this set or any contained subset
|
boolean |
containsAll(Collection<?> c)
Returns true iff all elements in the collection are contained in this set or contained sets
|
boolean |
isEmpty()
Returns true iff the set is empty and does not contain a nonempty subset
|
Iterator<T> |
iterator()
Returns an interator that iterates through all elements in this set including elements in
contained subsets
|
boolean |
remove(Object o)
Removed an element from the set.
|
boolean |
removeAll(Collection<?> c)
Removes the objects of this set that are contained in collection.
|
boolean |
retainAll(Collection<?> c)
Preserves only the objects of this set that are contained in collection.
|
int |
size()
Returns the number of elements in the set including elements in contained subsets
|
Object[] |
toArray()
Returns all elements in the set including contained subsets as an array
|
<S> S[] |
toArray(S[] a)
Returns all elements in the set including contained subsets as an array of the specified size
|
boolean |
walk(dk.brics.servletvalidator.util.LinkedSet.SetWalker<T> walker,
dk.brics.servletvalidator.util.LinkedSet.Operation op) |
public boolean add(T o)
public boolean addAll(Collection<? extends T> c)
public void addSet(LinkedSet<T> set)
set
- The set that is a subset of this.public void clear()
public boolean contains(Object obj)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T>
containsAll
in interface Set<T>
public boolean isEmpty()
public Iterator<T> iterator()
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
public <S> S[] toArray(S[] a)
public boolean walk(dk.brics.servletvalidator.util.LinkedSet.SetWalker<T> walker, dk.brics.servletvalidator.util.LinkedSet.Operation op)
Copyright © 2008-2013 Mathias Schwarz.