Opus5
Class Str

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

public class Str
extends AbstractObject

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

Version:
$Id: Str.java,v 3.3 1998/07/28 14:10:24 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Comparable

Field Summary
protected  java.lang.String value
          The wrapped String.
 
Fields inherited from interface Opus5.Comparable
copyright
 
Constructor Summary
Str(java.lang.String value)
          Constructs a Str with the specified value.
 
Method Summary
protected  int compareTo(Comparable object)
          Compares this Str with the specified comparable object.
 int hashCode()
          Returns a hashcode for this Str.
 java.lang.String stringValue()
          Returns the value of this Str.
 java.lang.String toString()
          Returns a string representation of this Str.
 
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 java.lang.String value
The wrapped String.
Constructor Detail

Str

public Str(java.lang.String value)
Constructs a Str with the specified value.
Parameters:
value - The specified value.
Method Detail

stringValue

public java.lang.String stringValue()
Returns the value of this Str.
Returns:
The value of this Str.

compareTo

protected int compareTo(Comparable object)
Compares this Str with the specified comparable object. The specified comparable object is assumed to be a Str instance. Implemented by calling the String.compareTo method.
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 Str.
Overrides:
hashCode in class java.lang.Object
Returns:
A hashcode for this Str.

toString

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