java.lang.Object
net.okapia.osid.torrefacto.collect.TypeSet
net.okapia.osid.torrefacto.collect.TypeEnumSet<E>
- Type Parameters:
E- the element type
A
TypeSet whose members are drawn from a Java enum.
The enum constants implement TypeEnum, each supplying one
org.osid.type.Type; the constructor loads every constant's
type into the set. getEnum(Type) then maps a type back to the
enum constant that carries it.
This is the convenient way to expose a fixed, compile-time set of
supported types and recover their enum form on lookup.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class TypeSet
add, clear, contains, iterator, remove, toArray, toCollectionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
TypeEnumSet
Constructs a newTypeEnumSet.- Parameters:
enumClass- the enum class whose constants supply the types- Throws:
NullArgumentException-enumClassisnull
-
-
Method Details
-
getEnum
Gets the enumerated value for a type.- Parameters:
type- the type- Returns:
- enumerated value
- Throws:
NullArgumentException-typeisnullUnsupportedException-typeis not in enumeration
-