public abstract class BaseValueObject extends Object implements ValueObject, Serializable
ValueObject
,DomainValueObject
. This
base class provides an implementation equals(Object)
and hashCode()
methods
based on all the value object attributes. This mechanism is reflection-based and can be
overridden for performance purposes. When doing so, take care of respecting the semantics of
value object equality.
ValueObject
,
DomainValueObject
,
Serialized FormConstructor and Description |
---|
BaseValueObject() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Computes the equality by reflection on all non-transient fields.
|
int |
hashCode()
Computes the hash code by reflection on all non-transient fields.
|
String |
toString() |
public int hashCode()
hashCode
in interface ValueObject
hashCode
in class Object
public boolean equals(Object other)
equals
in interface ValueObject
equals
in class Object
other
- other objectValueObject
and has the same value as this value
object, false otherwise.Copyright © 2013-2018–2019 SeedStack. All rights reserved.