com.planet_ink.coffee_mud.Items.interfaces
Enum RawMaterial.Material

java.lang.Object
  extended by java.lang.Enum<RawMaterial.Material>
      extended by com.planet_ink.coffee_mud.Items.interfaces.RawMaterial.Material
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RawMaterial.Material>
Enclosing interface:
RawMaterial

public static enum RawMaterial.Material
extends java.lang.Enum<RawMaterial.Material>

An enum of all the basic material types, allowing lookups and such


Enum Constant Summary
CLOTH
           
ENERGY
           
FLESH
           
GAS
           
GLASS
           
LEATHER
           
LIQUID
           
METAL
           
MITHRIL
           
PAPER
           
PRECIOUS
           
ROCK
           
SYNTHETIC
           
UNKNOWN
           
VEGETATION
           
WOODEN
           
 
Method Summary
 java.lang.String desc()
          Gets the coded enum uppercase name of this material.
static RawMaterial.Material find(java.lang.String name)
          Gets the material enum object given the exact uppercase name.
static RawMaterial.Material findByMask(int mask)
          Gets the material enum object given the material code
static RawMaterial.Material findIgnoreCase(java.lang.String name)
          Gets the material enum object given the case-insensitive name.
 int mask()
          The 2nd byte material code mask
static java.lang.String[] names()
          Gets the list of all enum material code uppercase names
 java.lang.String noun()
          Gets the friendly name of the material
static int size()
          The number of basic materials
static RawMaterial.Material startsWith(java.lang.String name)
          Searches for the first material enum that starts with the given name
static RawMaterial.Material startsWithIgnoreCase(java.lang.String name)
          Searches for the first material enum that starts with the given case-insensitive name
static RawMaterial.Material valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RawMaterial.Material[] 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

UNKNOWN

public static final RawMaterial.Material UNKNOWN

CLOTH

public static final RawMaterial.Material CLOTH

LEATHER

public static final RawMaterial.Material LEATHER

METAL

public static final RawMaterial.Material METAL

MITHRIL

public static final RawMaterial.Material MITHRIL

WOODEN

public static final RawMaterial.Material WOODEN

GLASS

public static final RawMaterial.Material GLASS

VEGETATION

public static final RawMaterial.Material VEGETATION

FLESH

public static final RawMaterial.Material FLESH

PAPER

public static final RawMaterial.Material PAPER

ROCK

public static final RawMaterial.Material ROCK

LIQUID

public static final RawMaterial.Material LIQUID

PRECIOUS

public static final RawMaterial.Material PRECIOUS

ENERGY

public static final RawMaterial.Material ENERGY

SYNTHETIC

public static final RawMaterial.Material SYNTHETIC

GAS

public static final RawMaterial.Material GAS
Method Detail

values

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

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

valueOf

public static RawMaterial.Material 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

size

public static int size()
The number of basic materials

Returns:
number of basic materials

mask

public int mask()
The 2nd byte material code mask

Returns:
the material code

noun

public java.lang.String noun()
Gets the friendly name of the material

Returns:
the friendly name of the material

desc

public java.lang.String desc()
Gets the coded enum uppercase name of this material.

Returns:
the coded enum uppercase name of this material.

names

public static java.lang.String[] names()
Gets the list of all enum material code uppercase names

Returns:
the list of all enum material code uppercase names

findByMask

public static RawMaterial.Material findByMask(int mask)
Gets the material enum object given the material code

Parameters:
mask - the material code to look up
Returns:
the material enum object or null

find

public static RawMaterial.Material find(java.lang.String name)
Gets the material enum object given the exact uppercase name.

Parameters:
name - the exact uppercase material name to look up
Returns:
the material enum object or null

findIgnoreCase

public static RawMaterial.Material findIgnoreCase(java.lang.String name)
Gets the material enum object given the case-insensitive name.

Parameters:
name - the case-insensitive name
Returns:
the material enum object or null

startsWith

public static RawMaterial.Material startsWith(java.lang.String name)
Searches for the first material enum that starts with the given name

Parameters:
name - the name to look for as a prefix
Returns:
the first material enum matching, or null

startsWithIgnoreCase

public static RawMaterial.Material startsWithIgnoreCase(java.lang.String name)
Searches for the first material enum that starts with the given case-insensitive name

Parameters:
name - the name to look for as a prefix
Returns:
the first material enum matching, or null