Enum WhichTCE

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

    public enum WhichTCE
    extends java.lang.Enum<WhichTCE>
    This 'enum' is used to identify of what kind of TCE instance 'this' is. A TCE may represet a Chrome Dev-Tools Protocol Type, Command or Event.

    An Enumerated Constant Design Pattern was chosen of building actual subclasses of TCE since such a sub-class "Type" or "Command" would not have been able to add any methods or fields to the sub-class. Instead, class TCE 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
      Command
      This constant may be used to indicate that 'this' TCE instance represents a 'Command'.
      Event
      This constant may be used to indicate that 'this' TCE instance represents a 'Type'.
      Type
      This constant may be used to indicate that 'this' TCE instance represents a 'Type'.
    • Method Summary

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

      • Type

        🡇     🗕  🗗  🗖
        public static final WhichTCE Type
        This constant may be used to indicate that 'this' TCE instance represents a 'Type'. Type-TCE's are converted into Static Nested-Classes in this Java implementation of the Chrome Dev-Tools Protocol.
      • Command

        🡅  🡇     🗕  🗗  🗖
        public static final WhichTCE Command
        This constant may be used to indicate that 'this' TCE instance represents a 'Command'. Command-TCE's are converted into methods in this Java implementation of the Chrome Dev-Tools Protocol.
      • Event

        🡅  🡇     🗕  🗗  🗖
        public static final WhichTCE Event
        This constant may be used to indicate that 'this' TCE instance represents a 'Type'. Type-TCE's are converted into Static Nested-Classes which inherit the BrowserEvent interface in this Java implementation of the Chrome Dev-Tools Protocol.
    • Method Detail

      • values

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

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