se.citerus.dddsample.domain.shared.experimental
Interface ValueObject<T>


public interface ValueObject<T>

A value object.


Method Summary
 T copy()
          Value objects can be freely copied.
 boolean sameValueAs(T other)
          Value objects compare by the values of their attributes, they don't have an identity.
 

Method Detail

sameValueAs

boolean sameValueAs(T other)
Value objects compare by the values of their attributes, they don't have an identity.

Parameters:
other - The other value object.
Returns:
true if the given value object's and this value object's attributes are the same.

copy

T copy()
Value objects can be freely copied.

Returns:
A safe, deep copy of this value object.


Copyright © 2009. All Rights Reserved.