Package 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.- Author:
- Matthew Wakeling
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
static <T> AlwaysSet<T>
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
-
-
-
-
Method Detail
-
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 interfacejava.util.Collection<E>
- Specified by:
containsAll
in interfacejava.util.Set<E>
- Overrides:
containsAll
in classPseudoSet<E>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-