@Beta
public final class If
extends java.lang.Object
if-else
" or ternary operator: "? :
" is preferred over this class.Modifier and Type | Class and Description |
---|---|
static class |
If.IF
Deprecated.
|
static class |
If.Or |
Modifier and Type | Method and Description |
---|---|
static If |
exists(int index)
true for index >= 0 , false for index < 0 . |
static If |
is(boolean b) |
static If |
isNullOrEmpty(boolean[] a) |
static If |
isNullOrEmpty(byte[] a) |
static If |
isNullOrEmpty(char[] a) |
static If |
isNullOrEmpty(java.lang.CharSequence s) |
static If |
isNullOrEmpty(java.util.Collection<?> c) |
static If |
isNullOrEmpty(double[] a) |
static If |
isNullOrEmpty(float[] a) |
static If |
isNullOrEmpty(int[] a) |
static If |
isNullOrEmpty(long[] a) |
static If |
isNullOrEmpty(LongMultiset<?> s) |
static If |
isNullOrEmpty(java.util.Map<?,?> m) |
static If |
isNullOrEmpty(Multimap<?,?,?> m) |
static If |
isNullOrEmpty(Multiset<?> s) |
static If |
isNullOrEmpty(java.lang.Object[] a) |
static If |
isNullOrEmpty(PrimitiveList list) |
static If |
isNullOrEmpty(short[] a) |
static If |
isNullOrEmptyOrBlank(java.lang.CharSequence s) |
static If |
not(boolean b) |
static If |
notNullOrEmpty(boolean[] a) |
static If |
notNullOrEmpty(byte[] a) |
static If |
notNullOrEmpty(char[] a) |
static If |
notNullOrEmpty(java.lang.CharSequence s) |
static If |
notNullOrEmpty(java.util.Collection<?> c) |
static If |
notNullOrEmpty(double[] a) |
static If |
notNullOrEmpty(float[] a) |
static If |
notNullOrEmpty(int[] a) |
static If |
notNullOrEmpty(long[] a) |
static If |
notNullOrEmpty(LongMultiset<?> s) |
static If |
notNullOrEmpty(java.util.Map<?,?> m) |
static If |
notNullOrEmpty(Multimap<?,?,?> m) |
static If |
notNullOrEmpty(Multiset<?> s) |
static If |
notNullOrEmpty(java.lang.Object[] a) |
static If |
notNullOrEmpty(PrimitiveList list) |
static If |
notNullOrEmpty(short[] a) |
static If |
notNullOrEmptyOrBlank(java.lang.CharSequence s) |
<E extends java.lang.Exception> |
then(Try.Runnable<E> cmd) |
<U,E extends java.lang.Exception> |
then(U seed,
Try.Consumer<? super U,E> action) |
If.Or |
thenDoNothing() |
<E extends java.lang.Exception> |
thenThrow(Supplier<? extends E> exceptionSupplier) |
public static If is(boolean b)
public static If not(boolean b)
public static If exists(int index)
true
for index >= 0
, false
for index < 0
.index
- public static If isNullOrEmpty(java.lang.CharSequence s)
public static If isNullOrEmpty(boolean[] a)
public static If isNullOrEmpty(char[] a)
public static If isNullOrEmpty(byte[] a)
public static If isNullOrEmpty(short[] a)
public static If isNullOrEmpty(int[] a)
public static If isNullOrEmpty(long[] a)
public static If isNullOrEmpty(float[] a)
public static If isNullOrEmpty(double[] a)
public static If isNullOrEmpty(java.lang.Object[] a)
public static If isNullOrEmpty(java.util.Collection<?> c)
public static If isNullOrEmpty(java.util.Map<?,?> m)
public static If isNullOrEmpty(PrimitiveList list)
public static If isNullOrEmpty(LongMultiset<?> s)
public static If isNullOrEmptyOrBlank(java.lang.CharSequence s)
public static If notNullOrEmpty(java.lang.CharSequence s)
public static If notNullOrEmpty(boolean[] a)
public static If notNullOrEmpty(char[] a)
public static If notNullOrEmpty(byte[] a)
public static If notNullOrEmpty(short[] a)
public static If notNullOrEmpty(int[] a)
public static If notNullOrEmpty(long[] a)
public static If notNullOrEmpty(float[] a)
public static If notNullOrEmpty(double[] a)
public static If notNullOrEmpty(java.lang.Object[] a)
public static If notNullOrEmpty(java.util.Collection<?> c)
public static If notNullOrEmpty(java.util.Map<?,?> m)
public static If notNullOrEmpty(PrimitiveList list)
public static If notNullOrEmpty(LongMultiset<?> s)
public static If notNullOrEmptyOrBlank(java.lang.CharSequence s)
public If.Or thenDoNothing()
public <E extends java.lang.Exception> If.Or then(Try.Runnable<E> cmd) throws E extends java.lang.Exception
E extends java.lang.Exception
public <U,E extends java.lang.Exception> If.Or then(U seed, Try.Consumer<? super U,E> action) throws E extends java.lang.Exception
E extends java.lang.Exception