AbstractProtected AbstractgetReturns the components that determine equality for this Value Object. Two Value Objects are equal if all their equality components are equal.
An array of values used for equality comparison
Compares this Value Object with another for equality. Value Objects are equal if they are of the same type and all equality components match.
The other Value Object to compare with
true if the Value Objects are equal, false otherwise
Base class for Value Objects in Domain-Driven Design.
Value Objects are immutable objects that represent descriptive aspects of the domain with no conceptual identity. They are compared by their structural content rather than identity.
Example