commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@coredevelopers.net>
Subject [lang] Should ObjectUtils.Null provide toString(), hashCode() & equals() ?
Date Wed, 03 Sep 2003 12:46:36 GMT
Should ObjectUtils.Null provide toString(), hashCode() & equals() as 
such:

    public String toString() {
       return null;
    }

    public int hashCode() {
       return 0;
    }

    public boolean equals(final Object obj) {
       if (obj == this) return true;
       return (obj == null || obj.getClass() == getClass());
    }

?

--jason


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message