FileDocCategorySizeDatePackage
ValueObject.javaAPI DocExample729Thu Nov 08 00:22:36 GMT 2001com.ora.rmibook.chapter12.bank.valueobjects

ValueObject

public abstract class ValueObject extends Object implements Serializable

Fields Summary
private String
_stringifiedRepresentation
private boolean
_alreadyHashed
private 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;