org.omnifaces.el.functions
Class Objects

java.lang.Object
  extended by org.omnifaces.el.functions.Objects

public final class Objects
extends java.lang.Object

Collection of EL functions for objects.

Author:
Bauke Scholtz

Method Summary
static java.lang.Object coalesce(java.lang.Object first, java.lang.Object second)
          Returns the first non-null object from the provided two objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

coalesce

public static java.lang.Object coalesce(java.lang.Object first,
                                        java.lang.Object second)
Returns the first non-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.

Parameters:
first - The first object.
second - The second object.
Returns:
The first non-null object from the provided two objects.