org.inigma.utopia
Enum Rank
java.lang.Object
java.lang.Enum<Rank>
org.inigma.utopia.Rank
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Rank>
public enum Rank
- extends java.lang.Enum<Rank>
Method Summary |
java.lang.String |
getTitle()
|
java.lang.String |
getTitle(boolean male)
|
java.lang.String[] |
getTitles()
|
static boolean |
isMale(java.lang.String title)
|
static Rank |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Rank[] |
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 |
Peasant
public static final Rank Peasant
Knight
public static final Rank Knight
Lord
public static final Rank Lord
Baron
public static final Rank Baron
Viscount
public static final Rank Viscount
Count
public static final Rank Count
Marquis
public static final Rank Marquis
Duke
public static final Rank Duke
Prince
public static final Rank Prince
Monarch
public static final Rank Monarch
Unknown
public static final Rank Unknown
values
public static Rank[] 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 (Rank c : Rank.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Rank 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
getTitle
public java.lang.String getTitle()
getTitle
public java.lang.String getTitle(boolean male)
getTitles
public java.lang.String[] getTitles()
isMale
public static boolean isMale(java.lang.String title)
Copyright © 2008. All Rights Reserved.