public class Blutils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Blutils.CheckedFunction<T,R> |
static interface |
Blutils.UnreliableFunction<T,E extends java.lang.Throwable> |
Constructor and Description |
---|
Blutils() |
Modifier and Type | Method and Description |
---|---|
static <X> java.util.List<X> |
filter(java.util.List<X> values,
java.util.function.Predicate<X> condition) |
static <X> int |
lastIndex(java.util.List<X> values,
java.util.function.Predicate<X> condition) |
static <X,Y> java.util.List<Y> |
map(java.util.List<? extends X> values,
Blutils.CheckedFunction<? super X,? extends Y> mapper) |
static <X,Y> java.util.List<Y> |
mapIgnoringExceptions(java.util.List<? extends X> values,
Blutils.CheckedFunction<? super X,? extends Y> mapper) |
static <X extends java.io.Serializable> |
meetsConditions(java.util.List<Condition<X>> conditions,
X object) |
static void |
recursiveDelete(java.io.File file) |
static long |
roundDownToMultiple(long value,
long multiple) |
static <X,Y extends java.lang.Comparable<Y>> |
sortByMappedValue(java.util.List<X> values,
java.util.function.Function<? super X,? extends Y> mapper) |
static java.lang.Runnable |
surroundTaskWithTryCatch(java.lang.Runnable r) |
static java.lang.String |
toHex(byte[] bytes) |
static java.lang.String |
toHex(byte[] bytes,
int offset,
int length) |
static <T,E extends java.lang.Throwable> |
tryMultipleTimes(int attempts,
Blutils.UnreliableFunction<T,E> function) |
static boolean |
trySleep(long timeMillis) |
public static <X extends java.io.Serializable> boolean meetsConditions(java.util.List<Condition<X>> conditions, X object)
public static long roundDownToMultiple(long value, long multiple)
public static <X,Y extends java.lang.Comparable<Y>> void sortByMappedValue(java.util.List<X> values, java.util.function.Function<? super X,? extends Y> mapper)
public static <X,Y> java.util.List<Y> map(java.util.List<? extends X> values, Blutils.CheckedFunction<? super X,? extends Y> mapper) throws BlueDbException
BlueDbException
public static <X,Y> java.util.List<Y> mapIgnoringExceptions(java.util.List<? extends X> values, Blutils.CheckedFunction<? super X,? extends Y> mapper)
public static <X> java.util.List<X> filter(java.util.List<X> values, java.util.function.Predicate<X> condition)
public static <X> int lastIndex(java.util.List<X> values, java.util.function.Predicate<X> condition)
public static boolean trySleep(long timeMillis)
public static void recursiveDelete(java.io.File file)
public static <T,E extends java.lang.Throwable> T tryMultipleTimes(int attempts, Blutils.UnreliableFunction<T,E> function) throws java.lang.Throwable
java.lang.Throwable
public static java.lang.String toHex(byte[] bytes)
public static java.lang.String toHex(byte[] bytes, int offset, int length)
public static java.lang.Runnable surroundTaskWithTryCatch(java.lang.Runnable r)