jurpe.system.generation
Enum ItemValueType

java.lang.Object
  extended by java.lang.Enum<ItemValueType>
      extended by jurpe.system.generation.ItemValueType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ItemValueType>

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

ItemValueType constants determine the rarity of an object, ie:

 switch (ivt)
 {
        case TRASH:
                break;
        case COMMON:
                break;
        case NORMAL:
                break;
        case AVERAGE:
                break;
        case MORETHANAVG:
                break;
        case RARE:
                break;
        case UNIQUE:
                break;
 }
 

Author:
asaltar

Enum Constant Summary
AVERAGE
           
COMMON
           
MORETHANAVG
           
NORMAL
           
RARE
           
TRASH
           
UNIQUE
           
 
Method Summary
static ItemValueType fromValue(byte value)
          Create a new ItemValueType of the give value
 byte getType()
          Return the value of this item
static ItemValueType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ItemValueType[] values()
          Returns an array containing the constants of this enum type, in the order they're 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

TRASH

public static final ItemValueType TRASH

COMMON

public static final ItemValueType COMMON

NORMAL

public static final ItemValueType NORMAL

AVERAGE

public static final ItemValueType AVERAGE

MORETHANAVG

public static final ItemValueType MORETHANAVG

RARE

public static final ItemValueType RARE

UNIQUE

public static final ItemValueType UNIQUE
Method Detail

values

public static final ItemValueType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ItemValueType c : ItemValueType.values())
        System.out.println(c);

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

valueOf

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

fromValue

public static ItemValueType fromValue(byte value)
Create a new ItemValueType of the give value

Parameters:
value - Value of item (10 to 250 where 10 is common and 250 is very rare)
Returns:
newly created ItemValueType

getType

public byte getType()
Return the value of this item

Returns:
Type of this item

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net