Package io.fluxcapacitor.common
Class ObjectUtils
java.lang.Object
io.fluxcapacitor.common.ObjectUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Callable<?> asCallable(ThrowingRunnable runnable) static <T> Consumer<T> asConsumer(ThrowingConsumer<T> consumer) static <T,R> Function <T, R> asFunction(ThrowingFunction<T, R> function) static PropertiesasProperties(String content) static RunnableasRunnable(ThrowingRunnable runnable) static RunnableasRunnable(Callable<?> callable) static Stream<?> static <T> Supplier<T> asSupplier(Callable<T> callable) static <T> Tstatic <T> Stream<T> static PropertiescopyOf(Properties properties) static <T> List<T> deduplicate(List<T> list) static <T> List<T> deduplicate(List<T> list, Function<T, ?> idFunction) static <T> List<T> deduplicate(List<T> list, Function<T, ?> idFunction, boolean keepFirst) static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) static ObjectforceThrow(Throwable error) static byte[]getBytes(ByteBuffer buffer) ifTrue(boolean check) static <T> Stream<T> iterate(T seed, UnaryOperator<T> f, Predicate<T> breakCondition) static <T,U, R> MemoizingBiFunction <T, U, R> memoize(BiFunction<T, U, R> supplier) static <K,V> MemoizingFunction <K, V> static <T> MemoizingSupplier<T> static Propertiesmerge(Properties a, Properties b) static ExecutorServicenewNamedWorkStealingPool(int parallelism, String prefix) static ThreadFactorynewThreadFactory(String prefix) static StringnewThreadName(String prefix) static <T,U> BiPredicate <T, U> static <T> Predicate<T> static voidrun(ThrowingRunnable runnable) static <T> Consumer<? super T> static Runnablestatic voidstatic Throwable
-
Constructor Details
-
ObjectUtils
public ObjectUtils()
-
-
Method Details
-
noOpPredicate
-
noOpBiPredicate
-
distinctByKey
-
iterate
-
concat
-
deduplicate
-
deduplicate
-
deduplicate
-
asStream
-
ifTrue
-
forceThrow
-
call
-
run
-
asCallable
-
tryRun
-
tryCatch
-
asSupplier
-
asRunnable
-
asFunction
-
asConsumer
-
asRunnable
-
getBytes
-
unwrapException
-
asProperties
-
copyOf
-
merge
-
memoize
-
memoize
-
memoize
-
newThreadName
-
newThreadFactory
-
newNamedWorkStealingPool
-
tryAccept
-