se.citerus.dddsample.domain.model.voyage
Class CarrierMovement
java.lang.Object
se.citerus.dddsample.domain.model.voyage.CarrierMovement
- All Implemented Interfaces:
- java.io.Serializable, ValueObject<CarrierMovement>
public final class CarrierMovement
- extends java.lang.Object
- implements ValueObject<CarrierMovement>
A carrier movement is a vessel voyage from one location to another.
- See Also:
- Serialized Form
Constructor Summary |
CarrierMovement(Location departureLocation,
Location arrivalLocation,
java.util.Date departureTime,
java.util.Date arrivalTime)
Constructor. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
NONE
public static final CarrierMovement NONE
CarrierMovement
public CarrierMovement(Location departureLocation,
Location arrivalLocation,
java.util.Date departureTime,
java.util.Date arrivalTime)
- Constructor.
- Parameters:
departureLocation
- location of departurearrivalLocation
- location of arrivaldepartureTime
- time of departurearrivalTime
- time of arrival
departureLocation
public Location departureLocation()
- Returns:
- Departure location.
arrivalLocation
public Location arrivalLocation()
- Returns:
- Arrival location.
departureTime
public java.util.Date departureTime()
- Returns:
- Time of departure.
arrivalTime
public java.util.Date arrivalTime()
- Returns:
- Time of arrival.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
sameValueAs
public boolean sameValueAs(CarrierMovement other)
- Description copied from interface:
ValueObject
- Value objects compare by the values of their attributes, they don't have an identity.
- Specified by:
sameValueAs
in interface ValueObject<CarrierMovement>
- Parameters:
other
- The other value object.
- Returns:
true
if the given value object's and this value object's attributes are the same.
Copyright © 2009. All Rights Reserved.