FileDocCategorySizeDatePackage
ValueObject.javaAPI DocExample714Thu Nov 08 00:22:32 GMT 2001com.ora.rmibook.chapter10

ValueObject

public abstract class ValueObject extends Object implements Serializable

Fields Summary
protected String
_stringifiedRepresentation
protected boolean
_alreadyHashed
protected int
_hashCode
Constructors Summary
public ValueObject(String stringifiedRepresentation)

        _stringifiedRepresentation = stringifiedRepresentation;
        _alreadyHashed = false;
    
Methods Summary
public inthashCode()

        if (false == _alreadyHashed) {
            _hashCode = _stringifiedRepresentation.hashCode();
            _alreadyHashed = true;
        }
        return _hashCode;
    
public java.lang.StringtoString()

        return _stringifiedRepresentation;