CLRA 0.1.2

com.clra.rowing
Class OarsetView

java.lang.Object
  |
  +--com.clra.rowing.OarsetView
All Implemented Interfaces:
Comparable, Serializable

public class OarsetView
extends Object
implements Comparable, Serializable

Read-only information about a oarset.

Version:
$Id: OarsetView.java,v 1.2 2002/02/18 18:04:38 rphall Exp $
Author:
Rick Hall
See Also:
Serialized Form

Constructor Summary
OarsetView()
          Produces an invalid instance.
OarsetView(int id, String name, int size, String type)
           
 
Method Summary
 int compareTo(Object o)
          Defines a natural ordering for oarsets by name.
 boolean equals(Object o)
          Two oarsets are equal iff their id's are equal.
 int getId()
           
 String getName()
           
 int getSize()
           
 String getType()
           
 int hashCode()
          Oarset objects are hashed by id's
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OarsetView

public OarsetView()
Produces an invalid instance. Used only during deserialization.

OarsetView

public OarsetView(int id,
                  String name,
                  int size,
                  String type)
           throws ValidationException
Method Detail

getId

public int getId()

getName

public String getName()

getSize

public int getSize()

getType

public String getType()

equals

public boolean equals(Object o)
Two oarsets are equal iff their id's are equal.
Overrides:
equals in class Object

hashCode

public int hashCode()
Oarset objects are hashed by id's
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
              throws ClassCastException
Defines a natural ordering for oarsets by name. Note: this class has a natural ordering that is inconsistent with equals. Equality is defined by oarset id's, not by oarset names.
Specified by:
compareTo in interface Comparable
Parameters:
o - A oarset object.
Throws:
ClassCastException - if o is not a oarset object.

CLRA 0.1.2