|
ref_send API 2.17 defensive programming in Java |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.joe_e.Struct
public abstract class Struct
This abstract class contains implementations of the equals() and hashCode() methods that satisfy the Selfless interface. The provided equals() method computes equality of all fields using reflection.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
Tests for equality with another object. |
int |
hashCode()
Calculates the hash code. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final boolean equals(java.lang.Object other)
equals()
. This implementation uses
reflection to work for any subclass of Struct
.
equals
in class java.lang.Object
other
- candidate object
public final int hashCode()
Struct
. (two structs that are
equal()
structs will always have the same hashCode). The
precise return value of this method is unspecified, and may change in
future releases.
hashCode
in interface Selfless
hashCode
in class java.lang.Object
|
ref_send API 2.17 defensive programming in Java |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.