Enum WhichEntity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<WhichEntity>

    public enum WhichEntity
    extends java.lang.Enum<WhichEntity>
    This 'enum' is used to identify of which inheriting sub-class 'this' instance is. If 'this' is an instance of PPR, then the field 'this.which' will be equal to the Enum-Constant ClassPPR. If 'this' is a TCE instance, then 'this.which' equals ClassTCE.

    Base-Class Entity has only thtwworee sub-classes (class which inherit from Enity). They are PPR and TCE. As a result, this 'enum' has exactly two constants.


    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ClassPPR
      Signifies that 'this' Entity Sub-Class is an instance of PPR
      ClassTCE
      Signifies that 'this' Entity Sub-Class is an instance of TCE
    • Method Summary

       
      Convert String to Enum Constant
      Modifier and Type Method Description
      static WhichEntity valueOf​(String name)
      Returns the enum constant of this type with the specified name.
       
      List all Enum Constants
      Modifier and Type Method Description
      static WhichEntity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        🡅  🡇     🗕  🗗  🗖
        public static WhichEntity[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (WhichEntity c : WhichEntity.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        🡅     🗕  🗗  🗖
        public static WhichEntity valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null