se.citerus.dddsample.domain.model.voyage
Class Voyage
java.lang.Object
se.citerus.dddsample.domain.model.voyage.Voyage
- All Implemented Interfaces:
- Entity<Voyage>
public class Voyage
- extends java.lang.Object
- implements Entity<Voyage>
A Voyage.
Nested Class Summary |
static class |
Voyage.Builder
Builder pattern is used for incremental construction
of a Voyage aggregate. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NONE
public static final Voyage NONE
Voyage
public Voyage(VoyageNumber voyageNumber,
Schedule schedule)
voyageNumber
public VoyageNumber voyageNumber()
- Returns:
- Voyage number.
schedule
public Schedule schedule()
- Returns:
- Schedule.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
sameIdentityAs
public boolean sameIdentityAs(Voyage other)
- Description copied from interface:
Entity
- Entities compare by identity, not by attributes.
- Specified by:
sameIdentityAs
in interface Entity<Voyage>
- Parameters:
other
- The other entity.
- Returns:
- true if the identities are the same, regardles of other attributes.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009. All Rights Reserved.