ch.aplu.jcardgame
Enum Hand.SortType

java.lang.Object
  extended by java.lang.Enum<Hand.SortType>
      extended by ch.aplu.jcardgame.Hand.SortType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Hand.SortType>
Enclosing class:
Hand

public static enum Hand.SortType
extends java.lang.Enum<Hand.SortType>

Compare type used for the compareTo() implementation.


Enum Constant Summary
POINTPRIORITY
          Compare points.
RANKPRIORITY
          Compare rank first, if same compare suit.
SUITPRIORITY
          Compare suit first, if same compare rank.
 
Method Summary
static Hand.SortType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Hand.SortType[] 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

RANKPRIORITY

public static final Hand.SortType RANKPRIORITY
Compare rank first, if same compare suit.


SUITPRIORITY

public static final Hand.SortType SUITPRIORITY
Compare suit first, if same compare rank.


POINTPRIORITY

public static final Hand.SortType POINTPRIORITY
Compare points.

Method Detail

values

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

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

valueOf

public static Hand.SortType 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