Contents
Enum Class DetectorId
- All Implemented Interfaces:
Serializable
,Comparable<DetectorId>
,Constable
,Showable
The unique identifier of a type of detector.
DetectorId
is an
enumeration to ensure that within the geometry package there are can be no
ambiguity about what kind of detector is being referenced by a
DetectorId
. DetectorId
also associates an id number and a
short String
name with each type of detector. Detector id numbers are
loosely based on the CLAS12 Bank Numbering scheme. UNDEFINED
is used
to that there is no such detector could be found via whatever mechanism was
being used to retrieve a DetectorId
(e.g.
getId(java.lang.String)
}).- Author:
- jnhankins
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DetectorId
getId
(int number) Returns the DetectorId corresponding to the given id number or UNDEFINED if no DetectorId matches the given id number.static DetectorId
Returns the DetectorId corresponding to the given name or UNDEFINED if no DetectorId matches the given name.int
Returns the id number of the detector.getName()
Returns the name of the detector.void
show()
InvokesSystem.out.println(this)
.toString()
static DetectorId
Returns the enum constant of this class with the specified name.static DetectorId[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getIdNumber
public int getIdNumber()Returns the id number of the detector.- Returns:
- the id number of the detector
-
getName
-
show
-
toString
- Overrides:
toString
in classEnum<DetectorId>
-
getId
Returns the DetectorId corresponding to the given name or UNDEFINED if no DetectorId matches the given name.- Parameters:
name
- the name of the DetectrId to find- Returns:
- the corresponding DetectorId or UNDIFIED if not found
-
getId
Returns the DetectorId corresponding to the given id number or UNDEFINED if no DetectorId matches the given id number.- Parameters:
number
- the id number of the the DetectrId to find- Returns:
- the corresponding DetectorId or UNDIFIED if not found
-