CLRA 0.1.2

com.clra.rowing
Class SeatPreference

java.lang.Object
  |
  +--com.clra.rowing.SeatPreference
All Implemented Interfaces:
Serializable

public class SeatPreference
extends Object
implements Serializable

Defines seating preference that may be specified by a participant for a rowing session.

Version:
$Id: SeatPreference.java,v 1.2 2002/02/18 18:05:09 rphall Exp $
Author:
Rick Hall
See Also:
Serialized Form

Field Summary
static SeatPreference COX
          Indicates a member prefers to cox.
static String NAME_COX
          Indicates a member prefers to cox.
static String NAME_PORT
          Indicates a member prefers a port rowing position
static String NAME_PORT_THEN_STARBOARD
          Indicates a member prefers a port position, but will also row starboard.
static String NAME_STARBOARD
          Indicates a member prefers a starboard rowing position
static String NAME_STARBOARD_THEN_PORT
          Indicates a member prefers a starboard position, but will also row port.
static SeatPreference PORT
          Indicates a member prefers a port rowing position
static SeatPreference PORT_THEN_STARBOARD
          Indicates a member prefers a port position, but will also row starboard.
static SeatPreference STARBOARD
          Indicates a member prefers a starboard rowing position
static SeatPreference STARBOARD_THEN_PORT
          Indicates a member prefers a starboard position, but will also row port.
 
Constructor Summary
protected SeatPreference(String name)
           
 
Method Summary
static boolean compare(String s1, String s2)
           
 boolean equals(Object o)
           
 String getName()
           
static SeatPreference getSeatPreference(String name)
          SeatPreference is not a required field in a participant record, therefore if a null or blank name is passed to this method, an IllegalArgumentException is NOT thrown, but rather a null instance is returned.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_STARBOARD

public static final String NAME_STARBOARD
Indicates a member prefers a starboard rowing position

NAME_PORT

public static final String NAME_PORT
Indicates a member prefers a port rowing position

NAME_STARBOARD_THEN_PORT

public static final String NAME_STARBOARD_THEN_PORT
Indicates a member prefers a starboard position, but will also row port.

NAME_PORT_THEN_STARBOARD

public static final String NAME_PORT_THEN_STARBOARD
Indicates a member prefers a port position, but will also row starboard.

NAME_COX

public static final String NAME_COX
Indicates a member prefers to cox.

STARBOARD

public static final SeatPreference STARBOARD
Indicates a member prefers a starboard rowing position

PORT

public static final SeatPreference PORT
Indicates a member prefers a port rowing position

STARBOARD_THEN_PORT

public static final SeatPreference STARBOARD_THEN_PORT
Indicates a member prefers a starboard position, but will also row port.

PORT_THEN_STARBOARD

public static final SeatPreference PORT_THEN_STARBOARD
Indicates a member prefers a port position, but will also row starboard.

COX

public static final SeatPreference COX
Indicates a member prefers to cox.
Constructor Detail

SeatPreference

protected SeatPreference(String name)
Method Detail

getSeatPreference

public static SeatPreference getSeatPreference(String name)
                                        throws RowingException
SeatPreference is not a required field in a participant record, therefore if a null or blank name is passed to this method, an IllegalArgumentException is NOT thrown, but rather a null instance is returned.

Note: values not defined by this class, will throw a RowingException.


getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compare

public static boolean compare(String s1,
                              String s2)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

CLRA 0.1.2