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
OarsetView
public OarsetView()
- Produces an invalid instance. Used only during deserialization.
OarsetView
public OarsetView(int id,
String name,
int size,
String type)
throws ValidationException
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.