Opus5
Class Chr

java.lang.Object
  |
  +--Opus5.AbstractObject
        |
        +--Opus5.Chr
All Implemented Interfaces:
Comparable

public class Chr
extends AbstractObject

Wrapper class that wraps a char and implements the Comparable interface.

Version:
$Id: Chr.java,v 3.3 1998/07/28 13:23:31 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Comparable

Field Summary
protected  char value
          The wrapped char.
 
Fields inherited from interface Opus5.Comparable
copyright
 
Constructor Summary
Chr(char value)
          Constructs an Chr with the specified value.
 
Method Summary
 char charValue()
          Returns the value of this Chr.
protected  int compareTo(Comparable object)
          Compares this Chr with the specified comparable object.
 int hashCode()
          Returns a hashcode for this Chr.
 java.lang.String toString()
          Returns a string representation of this Chr.
 
Methods inherited from class Opus5.AbstractObject
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected char value
The wrapped char.
Constructor Detail

Chr

public Chr(char value)
Constructs an Chr with the specified value.
Parameters:
value - The specified value.
Method Detail

charValue

public char charValue()
Returns the value of this Chr.
Returns:
The value of this Chr.

compareTo

protected int compareTo(Comparable object)
Compares this Chr with the specified comparable object. The specified comparable object is assumed to be a Chr instance.
Overrides:
compareTo in class AbstractObject
Parameters:
object - The object with which this object is compared.
Returns:
A number less than zero if this object is less than the specified object; a number greater than zero if this object is greater than the specified object; zero if the two objects are equal.

hashCode

public int hashCode()
Returns a hashcode for this Chr.
Overrides:
hashCode in class java.lang.Object
Returns:
The value of this Chr.

toString

public java.lang.String toString()
Returns a string representation of this Chr.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Chr.