Package Torello.Browser.JsonAST
Enum WhichEntity
- java.lang.Object
-
- java.lang.Enum<WhichEntity>
-
- Torello.Browser.JsonAST.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 ofPPR, then the field'this.which'will be equal to the Enum-ConstantClassPPR. If'this'is aTCEinstance, then'this.which'equalsClassTCE.
Base-ClassEntityhas only thtwworee sub-classes (class which inherit fromEnity). They arePPRandTCE. As a result, this'enum'has exactly two constants.
Hi-Lited Source-Code:- View Here: Torello/Browser/JsonAST/WhichEntity.java
- Open New Browser-Tab: Torello/Browser/JsonAST/WhichEntity.java
File Size: 865 Bytes Line Count: 20 '\n' Characters Found
-
-
Method Summary
Convert String to Enum Constant Modifier and Type Method Description static WhichEntityvalueOf(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.
-
-
-
Enum Constant Detail
-
ClassPPR
public static final WhichEntity ClassPPR
-
ClassTCE
public static final WhichEntity ClassTCE
-
-
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 namejava.lang.NullPointerException- if the argument is null
-
-