org.intermine.util
Class AlwaysSet<E>
java.lang.Object
org.intermine.util.PseudoSet<E>
org.intermine.util.AlwaysSet<E>
- Type Parameters:
E - The element type
- All Implemented Interfaces:
- java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>
public final class AlwaysSet<E>
- extends PseudoSet<E>
A Set that always returns true for the contains method.
|
Method Summary |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection<?> c)
|
static
|
getInstance()
Returns a new AlwaysSet with the correct type parameters. |
java.lang.String |
toString()
|
| Methods inherited from class org.intermine.util.PseudoSet |
add, addAll, clear, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
equals, hashCode |
getInstance
public static <T> AlwaysSet<T> getInstance()
- Returns a new AlwaysSet with the correct type parameters.
- Type Parameters:
T - The type of the Set
- Returns:
- a Set that contains everything
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
- Specified by:
containsAll in interface java.util.Collection<E>- Specified by:
containsAll in interface java.util.Set<E>- Overrides:
containsAll in class PseudoSet<E>
toString
public java.lang.String toString()
-
- Overrides:
toString in class java.lang.Object