Package org.omnifaces.el.functions
Class Objects
- java.lang.Object
-
- org.omnifaces.el.functions.Objects
-
public final class Objects extends Object
Collection of EL functions for objects.- Author:
- Bauke Scholtz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
coalesce(Object first, Object second)
Returns the first non-null
object from the provided two objects.static boolean
isInstance(String className, Object object)
Returnstrue
if given object is an instance of the class as identified by given class name.
-
-
-
Method Detail
-
coalesce
public static Object coalesce(Object first, Object second)
Returns the first non-null
object from the provided two objects. So, if the first object is notnull
, then it will be returned, otherwise the second object will be returned.- Parameters:
first
- The first object.second
- The second object.- Returns:
- The first non-
null
object from the provided two objects.
-
isInstance
public static boolean isInstance(String className, Object object)
Returnstrue
if given object is an instance of the class as identified by given class name.- Parameters:
className
- Fully qualified class name of the class for which a class object needs to be created.object
- The object to be checked if it is an instance of the created class object.- Returns:
true
if given object is an instance of the class as identified by given class name.- Since:
- 3.0
-
-