Class Objects


  • public final class Objects
    extends Object
    Collection of EL functions for objects.
    Author:
    Bauke Scholtz
    • 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 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.
      • isInstance

        public static boolean isInstance​(String className,
                                         Object object)
        Returns true 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