FileDocCategorySizeDatePackage
ValueObject.javaAPI DocExample723Thu Nov 08 00:23:50 GMT 2001com.ora.rmibook.chapter7.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;