Class ObjectHelper
java.lang.Object
de.uplanet.lucy.server.auxiliaries.ObjectHelper
@VelocityVariable("ObjectHelper")
@VelocityCallable("singleton")
public final class ObjectHelper
extends Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetNull()de.uplanet.lucy.server.dataobjects.IValueHolder<?>booleanisFalseOrNull(Object p_obj) Checks if the given argument is a booleanfalse, ornull.booleanChecks if the given argument isnull.booleanisTrueOrNull(Object p_obj) Checks if the given argument is a booleantrue, ornull.booleanisVHNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) booleanisVHNullOrEmpty(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) Checks if the given object reference isnull, and returns either the object itself if it is notnull, or the provided fallback value if the object reference isnull.
- 
Constructor Details- 
ObjectHelperpublic ObjectHelper()
 
- 
- 
Method Details- 
isNullChecks if the given argument isnull.- Parameters:
- p_obj- The value to be checked.
- Returns:
- trueif the given value is- null, or- falseotherwise.
 
- 
orElseChecks if the given object reference isnull, and returns either the object itself if it is notnull, or the provided fallback value if the object reference isnull.- Parameters:
- p_obj- The object reference to check.
- p_fallback- The fallback value.
- Returns:
- The value of the object reference if it is not null, the fallback value otherwise.
- See Also:
 
- 
isTrueOrNullChecks if the given argument is a booleantrue, ornull.- Parameters:
- p_obj- A boolean value, or- null.
- Returns:
- trueif the given value is a boolean- trueor- null, or- falseotherwise.
- Throws:
- IllegalArgumentException- If the given argument is neither a boolean value nor- null.
 
- 
isFalseOrNullChecks if the given argument is a booleanfalse, ornull.- Parameters:
- p_obj- A boolean value, or- null.
- Returns:
- trueif the given value is a boolean- falseor- null, or- falseotherwise.
- Throws:
- IllegalArgumentException- If the given argument is neither a boolean value nor- null.
 
- 
getNull
- 
getNullValueHolderpublic de.uplanet.lucy.server.dataobjects.IValueHolder<?> getNullValueHolder()
- 
isVHNullpublic boolean isVHNull(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) 
- 
isVHNullOrEmptypublic boolean isVHNullOrEmpty(de.uplanet.lucy.server.dataobjects.IValueHolder<?> p_vh) 
 
-