Class ObjectUtils.OrElse

  • Enclosing class:
    ObjectUtils

    public static class ObjectUtils.OrElse
    extends Object
    Class allowing the invocation of a given Runnable depending on whether the previous operation was executed, formulated as a boolean.
    • Method Detail

      • orElse

        public void orElse​(Runnable runnable)
        Runs the given runnable depending on whether the previous executable was invoked, formulated through the executeRunnable set in the constructor.
        Parameters:
        runnable - the Runnable to execute if executeRunnable was set to true