public final class Objects extends Object
Modifier and Type | Method and 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)
Returns
true if given object is an instance of the class as identified by given class name. |
public static Object coalesce(Object first, Object second)
null
object from the provided two objects. So, if the first object is not
null
, then it will be returned, otherwise the second object will be returned.first
- The first object.second
- The second object.null
object from the provided two objects.public static boolean isInstance(String className, Object object)
true
if given object is an instance of the class as identified by given class name.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.true
if given object is an instance of the class as identified by given class name.Copyright © 2012–2020 OmniFaces. All rights reserved.