se.citerus.dddsample.domain.model.voyage
Class VoyageNumber

java.lang.Object
  extended by se.citerus.dddsample.domain.model.voyage.VoyageNumber
All Implemented Interfaces:
java.io.Serializable, ValueObject<VoyageNumber>

public class VoyageNumber
extends java.lang.Object
implements ValueObject<VoyageNumber>

Identifies a voyage.

See Also:
Serialized Form

Constructor Summary
VoyageNumber(java.lang.String number)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String idString()
           
 boolean sameValueAs(VoyageNumber other)
          Value objects compare by the values of their attributes, they don't have an identity.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VoyageNumber

public VoyageNumber(java.lang.String number)
Method Detail

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(VoyageNumber 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<VoyageNumber>
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

idString

public java.lang.String idString()


Copyright © 2009. All Rights Reserved.