Package net.sf.basedb.core.plugin
Enum GuiContext.Type
- java.lang.Object
-
- java.lang.Enum<GuiContext.Type>
-
- net.sf.basedb.core.plugin.GuiContext.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<GuiContext.Type>
- Enclosing class:
- GuiContext
public static enum GuiContext.Type extends Enum<GuiContext.Type>
-
-
Field Summary
Fields Modifier and Type Field Description private int
value
private static Map<Integer,GuiContext.Type>
valueMapping
Maps the integer that is stored in the database.
-
Constructor Summary
Constructors Modifier Constructor Description private
Type(int value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GuiContext.Type
fromValue(int value)
Get theGuiContext.Type
object when you know the integer code.int
getValue()
Get the integer value that is used when storing aGuiContext.Type
to the database.static GuiContext.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static GuiContext.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ITEM
public static final GuiContext.Type ITEM
-
LIST
public static final GuiContext.Type LIST
-
-
Field Detail
-
valueMapping
private static final Map<Integer,GuiContext.Type> valueMapping
Maps the integer that is stored in the database.
-
value
private final int value
-
-
Method Detail
-
values
public static GuiContext.Type[] 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 (GuiContext.Type c : GuiContext.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GuiContext.Type valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromValue
public static GuiContext.Type fromValue(int value)
Get theGuiContext.Type
object when you know the integer code.- Parameters:
value
- The integer value.- Returns:
- The type object or null if the value is unknown
-
getValue
public int getValue()
Get the integer value that is used when storing aGuiContext.Type
to the database.- Returns:
- The intger value of this type
-
-