Package thredds.catalog
Class CollectionType
- java.lang.Object
-
- thredds.catalog.CollectionType
-
public final class CollectionType extends Object
Type-safe enumeration of THREDDS coherent collection types.
-
-
Field Summary
Fields Modifier and Type Field Description static CollectionType
FORECASTS
static CollectionType
NONE
static CollectionType
STATIONS
static CollectionType
TIMESERIES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CollectionType with same name are equal.static CollectionType
findType(String name)
Return the known CollectionType that matches the given name (ignoring case) or null if the name is unknown.static Collection<CollectionType>
getAllTypes()
static CollectionType
getType(String name)
Return a CollectionType that matches the given name by either matching a known type (ignoring case) or creating an unknown type.int
hashCode()
Override Object.hashCode() to be consistent with this equals.String
toString()
Return the collection name.
-
-
-
Field Detail
-
NONE
public static final CollectionType NONE
-
TIMESERIES
public static final CollectionType TIMESERIES
-
STATIONS
public static final CollectionType STATIONS
-
FORECASTS
public static final CollectionType FORECASTS
-
-
Method Detail
-
getAllTypes
public static Collection<CollectionType> getAllTypes()
- Returns:
- all CollectionType objects
-
findType
public static CollectionType findType(String name)
Return the known CollectionType that matches the given name (ignoring case) or null if the name is unknown.- Parameters:
name
- name of the desired CollectionType.- Returns:
- CollectionType or null if no match.
-
getType
public static CollectionType getType(String name)
Return a CollectionType that matches the given name by either matching a known type (ignoring case) or creating an unknown type.- Parameters:
name
- name of the desired CollectionType- Returns:
- the named CollectionType or null if given name is null.
-
hashCode
public int hashCode()
Override Object.hashCode() to be consistent with this equals.
-
-