se.citerus.dddsample.domain.model.cargo
Class TrackingId
java.lang.Object
se.citerus.dddsample.domain.model.cargo.TrackingId
- All Implemented Interfaces:
- java.io.Serializable, ValueObject<TrackingId>
public final class TrackingId
- extends java.lang.Object
- implements ValueObject<TrackingId>
Uniquely identifies a particular cargo. Automatically generated by the application.
- See Also:
- Serialized Form
Constructor Summary |
TrackingId(java.lang.String id)
Constructor. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TrackingId
public TrackingId(java.lang.String id)
- Constructor.
- Parameters:
id
- Id string.
idString
public java.lang.String idString()
- Returns:
- String representation of this tracking id.
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(TrackingId 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<TrackingId>
- Parameters:
other
- The other value object.
- Returns:
true
if the given value object's and this value object's attributes are the same.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009. All Rights Reserved.