|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eobjects.metamodel.util.BaseObject
public abstract class BaseObject
A base object type with conveniently implemented base methods like hashCode()
and equals(). Subclasses should implement the decorateIdentity(List)
method to have equals(Object) and hashCode() automatically
implemented.
| Constructor Summary | |
|---|---|
BaseObject()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseObject()
| Method Detail |
|---|
public String toString()
toString in class Objectpublic final int hashCode()
hashCode in class Objectprotected boolean classEquals(BaseObject obj)
obj instanceof Number
and make sure that the decorateIdentity(...) method will always return a
comparable list of identity-objects.
obj -
public final boolean equals(Object obj)
equals in class Objectprotected abstract void decorateIdentity(List<Object> identifiers)
identifiers -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||