FileDocCategorySizeDatePackage
ValueObject.javaAPI DocExample730Thu Nov 08 00:23:08 GMT 2001com.ora.rmibook.chapter17.basic.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;