se.citerus.dddsample.domain.model.location
Class UnLocode
java.lang.Object
se.citerus.dddsample.domain.model.location.UnLocode
- All Implemented Interfaces:
- java.io.Serializable, ValueObject<UnLocode>
public final class UnLocode
- extends java.lang.Object
- implements ValueObject<UnLocode>
United nations location code.
http://www.unece.org/cefact/locode/
http://www.unece.org/cefact/locode/DocColumnDescription.htm#LOCODE
- See Also:
- Serialized Form
Constructor Summary |
UnLocode(java.lang.String countryAndLocation)
Constructor. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
UnLocode
public UnLocode(java.lang.String countryAndLocation)
- Constructor.
- Parameters:
countryAndLocation
- Location string.
idString
public java.lang.String idString()
- Returns:
- country code and location code concatenated, always upper case.
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(UnLocode 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<UnLocode>
- 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.