All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
lookup(java.lang.String name)Looks up an instance by name, returning null if not found.
lookupAll()Returns the immutable map of known instances by name.
default T lookup(java.lang.String name)Looks up an instance by name, returning null if not found.
The name contains enough information to be able to recreate the instance. The lookup should return null if the name is not known. The lookup must match the name where the match is case sensitive. Where possible implementations should match the upper-case form of the name, using
Locale.ENGLISH. Implementations can match completely case insensitive if desired, however this is not required. An exception should only be thrown if an error occurs during lookup.
The default implementation uses
name- the name to lookup
- the named object, null if not found
java.util.Map<java.lang.String,T> lookupAll()Returns the immutable map of known instances by name.
This method returns all known instances. It is permitted for an implementation to return an empty map, however this will reduce the usefulness of the matching method on
ExtendedEnum. The map may include instances keyed under an alternate name. For example, the map will often contain the same entry keyed under the upper-cased form of the name.
- the immutable map of enum instance by name