Package net.anwiba.commons.lang.optional
Class If
- java.lang.Object
-
- net.anwiba.commons.lang.optional.If
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IIfdefined(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>
IIfexcecute(IBlock<E> block)<O> IOptional<O,java.lang.RuntimeException>excecute(ISupplier<O,java.lang.RuntimeException> supplier)static IIfisTrue(boolean value)static IIfisTrue(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>
IIfor(IBlock<E> block)<O> IOptional<O,java.lang.RuntimeException>or(ISupplier<O,java.lang.RuntimeException> supplier)
-
-
-
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)
-
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
-
excecute
public <E extends java.lang.Exception> IIf excecute(IBlock<E> block) throws E extends java.lang.Exception
-
or
public <O> IOptional<O,java.lang.RuntimeException> or(ISupplier<O,java.lang.RuntimeException> supplier)
-
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
-
-