Package org.jmolecules.ddd.types
Class SimpleAssociation<T extends AggregateRoot<T,ID>,ID extends Identifier>
java.lang.Object
org.jmolecules.ddd.types.SimpleAssociation<T,ID>
- All Implemented Interfaces:
Association<T,,ID> Identifiable<ID>
class SimpleAssociation<T extends AggregateRoot<T,ID>,ID extends Identifier>
extends Object
implements Association<T,ID>
Simple implementation of
Association to effectively only define equals(Object) and
hashCode() on Association's static factory methods.- Since:
- 1.2
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleAssociation(Supplier<ID> identifier) Creates a newSimpleAssociationfor the given identifier. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jmolecules.ddd.types.Association
pointsTo, pointsTo, pointsToSameAggregateAs
-
Field Details
-
identifier
-
-
Constructor Details
-
SimpleAssociation
Creates a newSimpleAssociationfor the given identifier.- Parameters:
identifier- must not be null.
-
-
Method Details
-
getId
Description copied from interface:IdentifiableReturns the identifier.- Specified by:
getIdin interfaceIdentifiable<T extends AggregateRoot<T,ID>> - Returns:
-
toString
-
equals
-
hashCode
public int hashCode()
-