Class If

  • All Implemented Interfaces:
    IIf

    public class If
    extends java.lang.Object
    implements IIf
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static IIf defined​(java.lang.Object value)  
      <O,​E extends java.lang.Exception>
      IOptional<O,​E>
      excecute​(java.lang.Class<E> exceptionClass, ISupplier<O,​E> supplier)  
      <E extends java.lang.Exception>
      IIf
      excecute​(IBlock<E> block)  
      <O> IOptional<O,​java.lang.RuntimeException> excecute​(ISupplier<O,​java.lang.RuntimeException> supplier)  
      static IIf isTrue​(boolean value)  
      static IIf isTrue​(java.lang.Boolean value)  
      <O,​E extends java.lang.Exception>
      IOptional<O,​E>
      or​(java.lang.Class<E> exceptionClass, ISupplier<O,​E> supplier)  
      <E extends java.lang.Exception>
      IIf
      or​(IBlock<E> block)  
      <O> IOptional<O,​java.lang.RuntimeException> or​(ISupplier<O,​java.lang.RuntimeException> supplier)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isTrue

        public static IIf isTrue​(boolean value)
      • isTrue

        public static IIf isTrue​(java.lang.Boolean value)
      • defined

        public static IIf defined​(java.lang.Object value)
      • excecute

        public <O> IOptional<O,​java.lang.RuntimeException> excecute​(ISupplier<O,​java.lang.RuntimeException> supplier)
        Specified by:
        excecute in interface IIf
      • excecute

        public <O,​E extends java.lang.Exception> IOptional<O,​E> excecute​(java.lang.Class<E> exceptionClass,
                                                                                     ISupplier<O,​E> supplier)
                                                                              throws E extends java.lang.Exception
        Specified by:
        excecute in interface IIf
        Throws:
        E extends java.lang.Exception
      • excecute

        public <E extends java.lang.Exception> IIf excecute​(IBlock<E> block)
                                                     throws E extends java.lang.Exception
        Specified by:
        excecute in interface IIf
        Throws:
        E extends java.lang.Exception
      • or

        public <O> IOptional<O,​java.lang.RuntimeException> or​(ISupplier<O,​java.lang.RuntimeException> supplier)
        Specified by:
        or in interface IIf
      • or

        public <O,​E extends java.lang.Exception> IOptional<O,​E> or​(java.lang.Class<E> exceptionClass,
                                                                               ISupplier<O,​E> supplier)
                                                                        throws E extends java.lang.Exception
        Specified by:
        or in interface IIf
        Throws:
        E extends java.lang.Exception
      • or

        public <E extends java.lang.Exception> IIf or​(IBlock<E> block)
                                               throws E extends java.lang.Exception
        Specified by:
        or in interface IIf
        Throws:
        E extends java.lang.Exception