se.citerus.dddsample.domain.shared
Class DomainObjectUtils

java.lang.Object
  extended by se.citerus.dddsample.domain.shared.DomainObjectUtils

public class DomainObjectUtils
extends java.lang.Object

Utility code for domain classes.


Method Summary
static
<T> T
nullSafe(T actual, T safe)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nullSafe

public static <T> T nullSafe(T actual,
                             T safe)
Type Parameters:
T - type
Parameters:
actual - actual value
safe - a null-safe value
Returns:
actual value, if it's not null, or safe value if the actual value is null.


Copyright © 2009. All Rights Reserved.