se.citerus.dddsample.domain.model.cargo
Enum TransportStatus

java.lang.Object
  extended by java.lang.Enum<TransportStatus>
      extended by se.citerus.dddsample.domain.model.cargo.TransportStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TransportStatus>, ValueObject<TransportStatus>

public enum TransportStatus
extends java.lang.Enum<TransportStatus>
implements ValueObject<TransportStatus>

Represents the different transport statuses for a cargo.


Enum Constant Summary
CLAIMED
           
IN_PORT
           
NOT_RECEIVED
           
ONBOARD_CARRIER
           
UNKNOWN
           
 
Method Summary
 boolean sameValueAs(TransportStatus other)
          Value objects compare by the values of their attributes, they don't have an identity.
static TransportStatus valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TransportStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NOT_RECEIVED

public static final TransportStatus NOT_RECEIVED

IN_PORT

public static final TransportStatus IN_PORT

ONBOARD_CARRIER

public static final TransportStatus ONBOARD_CARRIER

CLAIMED

public static final TransportStatus CLAIMED

UNKNOWN

public static final TransportStatus UNKNOWN
Method Detail

values

public static TransportStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TransportStatus c : TransportStatus.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TransportStatus valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

sameValueAs

public boolean sameValueAs(TransportStatus 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<TransportStatus>
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.