net.curre.prefcount.gui.type
Enum ScoreItem

java.lang.Object
  extended by java.lang.Enum<ScoreItem>
      extended by net.curre.prefcount.gui.type.ScoreItem
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ScoreItem>

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

This enum represents score item on the score board to be used as keys in the score board location map.

Created date: May 29, 2008

Author:
Yevgeny Nyden

Enum Constant Summary
FINAL_MOUNT
          Key for the final mountain location.
FINAL_SCORE
          Key for the final score location.
PLAYER_AMNIST_MOUNT
          Key for the amnisted mountain's location.
PLAYER_FIXED_MOUNT
          Key for the fixed mountain's location.
PLAYER_MOUNT
          Key for the mountain's location.
PLAYER_NAME
          Key for the name's location.
PLAYER_NEW_MOUNT
          Key for the new mountain's location.
PLAYER_POOL
          Key for the pool's location.
PLAYER_POOL_CLOSED
          Key for the closed pool's location.
WHIST_EAST
          Key for the whist agains the East location.
WHIST_EAST_SALDO
          Key for the whist saldo with the East location.
WHIST_FIX_EAST
          Key for the whist fix agains the East location.
WHIST_FIX_NORTH
          Key for the whist fix agains the North location.
WHIST_FIX_SOUTH
          Key for the whist fix agains the South location.
WHIST_FIX_WEST
          Key for the whist fix agains the West location.
WHIST_NORTH
          Key for the whist agains the North location.
WHIST_NORTH_SALDO
          Key for the whist saldo with the North location.
WHIST_SALDO_TOTAL
          Key for the total whist saldo location.
WHIST_SOUTH
          Key for the whist agains the South location.
WHIST_SOUTH_SALDO
          Key for the whist saldo with the South location.
WHIST_WEST
          Key for the whist agains the West location.
WHIST_WEST_SALDO
          Key for the whist saldo with the West location.
 
Field Summary
 boolean isOtherPlace
          Flag that indicates, when true, that other player's name or place is required as an argument for the resource key; false indicates that the current player's name or place should be used as an argument with the resource key.
 java.lang.String key
          Resource key for this item.
 Place place
          This indicates that the item refers to a particular place (i.e.
 
Method Summary
static ScoreItem getWhistFixForWhist(Place whist)
          Determines the whist fix score item for the given place.
static ScoreItem valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ScoreItem[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PLAYER_NAME

public static final ScoreItem PLAYER_NAME
Key for the name's location.


PLAYER_MOUNT

public static final ScoreItem PLAYER_MOUNT
Key for the mountain's location.


PLAYER_NEW_MOUNT

public static final ScoreItem PLAYER_NEW_MOUNT
Key for the new mountain's location.


PLAYER_AMNIST_MOUNT

public static final ScoreItem PLAYER_AMNIST_MOUNT
Key for the amnisted mountain's location.


PLAYER_FIXED_MOUNT

public static final ScoreItem PLAYER_FIXED_MOUNT
Key for the fixed mountain's location.


PLAYER_POOL

public static final ScoreItem PLAYER_POOL
Key for the pool's location.


PLAYER_POOL_CLOSED

public static final ScoreItem PLAYER_POOL_CLOSED
Key for the closed pool's location.


WHIST_NORTH

public static final ScoreItem WHIST_NORTH
Key for the whist agains the North location.


WHIST_EAST

public static final ScoreItem WHIST_EAST
Key for the whist agains the East location.


WHIST_SOUTH

public static final ScoreItem WHIST_SOUTH
Key for the whist agains the South location.


WHIST_WEST

public static final ScoreItem WHIST_WEST
Key for the whist agains the West location.


WHIST_FIX_NORTH

public static final ScoreItem WHIST_FIX_NORTH
Key for the whist fix agains the North location.


WHIST_FIX_EAST

public static final ScoreItem WHIST_FIX_EAST
Key for the whist fix agains the East location.


WHIST_FIX_SOUTH

public static final ScoreItem WHIST_FIX_SOUTH
Key for the whist fix agains the South location.


WHIST_FIX_WEST

public static final ScoreItem WHIST_FIX_WEST
Key for the whist fix agains the West location.


WHIST_NORTH_SALDO

public static final ScoreItem WHIST_NORTH_SALDO
Key for the whist saldo with the North location.


WHIST_EAST_SALDO

public static final ScoreItem WHIST_EAST_SALDO
Key for the whist saldo with the East location.


WHIST_SOUTH_SALDO

public static final ScoreItem WHIST_SOUTH_SALDO
Key for the whist saldo with the South location.


WHIST_WEST_SALDO

public static final ScoreItem WHIST_WEST_SALDO
Key for the whist saldo with the West location.


WHIST_SALDO_TOTAL

public static final ScoreItem WHIST_SALDO_TOTAL
Key for the total whist saldo location.


FINAL_MOUNT

public static final ScoreItem FINAL_MOUNT
Key for the final mountain location.


FINAL_SCORE

public static final ScoreItem FINAL_SCORE
Key for the final score location.

Field Detail

place

public final Place place
This indicates that the item refers to a particular place (i.e. whists agains some player/place).


key

public final java.lang.String key
Resource key for this item.


isOtherPlace

public final boolean isOtherPlace
Flag that indicates, when true, that other player's name or place is required as an argument for the resource key; false indicates that the current player's name or place should be used as an argument with the resource key.

Method Detail

values

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

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

valueOf

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

getWhistFixForWhist

public static ScoreItem getWhistFixForWhist(Place whist)
Determines the whist fix score item for the given place.

Parameters:
whist - whist place.
Returns:
whist fix score item that corresponds to the given place.
Throws:
java.lang.IllegalArgumentException - when the passed argument is not supported.


Copyright © 2008. All Rights Reserved.