public abstract class BaseObject extends Object
decorateIdentity(List)
method to have equals(Object)
and hashCode()
automatically
implemented.Constructor and Description |
---|
BaseObject() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
classEquals(BaseObject obj)
Override this method if the equals method should support different
subtypes.
|
protected abstract void |
decorateIdentity(List<Object> identifiers)
Subclasses should implement this method and add all fields to the list
that are to be included in equals(...) and hashCode() evaluation
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
protected boolean classEquals(BaseObject obj)
obj instanceof Number
and make sure that the decorateIdentity(...) method will always return a
comparable list of identity-objects.obj
- Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.