Enum WhichPPR

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

    public enum WhichPPR
    extends java.lang.Enum<WhichPPR>
    Each insance of PPR that is created has an instance of this enum as a constant final field. The only purpose of this enum is to delineate what which kind of PPR an instance is.

    An Enumerated Constant Design Pattern was chosen of building actual subclasses of PPR since such a sub-class "Parameter" or "Property" would not have been able to add any methods or fields to the sub-class. Instead, class PPR simply contains one of these three constants among its constant fields list to identify what kind of instance it belongs to.


    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Parameter
      An enum constant which Signifies a PPR-Instance is a Method Parameter
      Property
      An enum constant which Signifies a PPR-Instance is a Class Field, a.k.a.
      Return
      An enum constant which Signifies a PPR-Instance is a Method Return Type
    • Field Summary

      Fields 
      Modifier and Type Field Description
      String propName
      The JsonObject property name which stores objects of the named kind / type.
    • Method Summary

       
      Convert String to Enum Constant
      Modifier and Type Method Description
      static WhichPPR valueOf​(String name)
      Returns the enum constant of this type with the specified name.
       
      List all Enum Constants
      Modifier and Type Method Description
      static WhichPPR[] 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
    • Field Detail

      • propName

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String propName
        The JsonObject property name which stores objects of the named kind / type.
        Code:
        Exact Field Declaration Expression:
         public final String propName;
        
    • Method Detail

      • values

        🡅  🡇     🗕  🗗  🗖
        public static WhichPPR[] 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 (WhichPPR c : WhichPPR.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        🡅     🗕  🗗  🗖
        public static WhichPPR 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