Enum Class DetectorId

java.lang.Object
java.lang.Enum<DetectorId>
org.jlab.geom.DetectorId
All Implemented Interfaces:
Serializable, Comparable<DetectorId>, Constable, Showable

public enum DetectorId extends Enum<DetectorId> implements 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
  • Enum Constant Details Link icon

  • Method Details Link icon

    • values Link icon

      public static DetectorId[] 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 Link icon

      public static DetectorId valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getIdNumber Link icon

      public int getIdNumber()
      Returns the id number of the detector.
      Returns:
      the id number of the detector
    • getName Link icon

      public String getName()
      Returns the name of the detector.
      Returns:
      the name of the detector
    • show Link icon

      public void show()
      Invokes System.out.println(this).
      Specified by:
      show in interface Showable
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Enum<DetectorId>
    • getId Link icon

      public static DetectorId getId(String name)
      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 Link icon

      public static DetectorId getId(int number)
      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