org.jlab.coda.jevio
Enum StructureType

java.lang.Object
  extended by java.lang.Enum<StructureType>
      extended by org.jlab.coda.jevio.StructureType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<StructureType>

public enum StructureType
extends java.lang.Enum<StructureType>

This an enum used to convert structure type numerical values to a more meaningful name. For example, the structure type with value 0xe corresponds to the enum BANK. Mostly this is used for printing.

Author:
heddle

Enum Constant Summary
BANK
           
SEGMENT
           
TAGSEGMENT
           
UNKNOWN32
           
 
Method Summary
static java.lang.String getName(int value)
          Obtain the name from the value.
static StructureType getStructureType(int value)
          Obtain the enum from the value.
 int getValue()
          Get the enum's value.
static StructureType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static StructureType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN32

public static final StructureType UNKNOWN32

TAGSEGMENT

public static final StructureType TAGSEGMENT

SEGMENT

public static final StructureType SEGMENT

BANK

public static final StructureType BANK
Method Detail

values

public static StructureType[] 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 (StructureType c : StructureType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static StructureType 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

getValue

public int getValue()
Get the enum's value.

Returns:
the value, e.g., 0xe for a BANK

getName

public static java.lang.String getName(int value)
Obtain the name from the value.

Parameters:
value - the value to match.
Returns:
the name, or "UNKNOWN".

getStructureType

public static StructureType getStructureType(int value)
Obtain the enum from the value.

Parameters:
value - the value to match.
Returns:
the matching enum, or null.