public final class Suppliers
extends java.lang.Object
Supplier.| Modifier and Type | Method and Description |
|---|---|
static <U,V> java.util.function.Function<U,V> |
asFunction(java.util.function.Supplier<V> supplier)
Creates a function ignoring it's parameter and just returning the supplier's value.
|
static <T> java.util.function.Supplier<T> |
constant(T t)
Returns a constant supplier.
|
static <U,V> java.util.function.Supplier<V> |
mapping(java.util.function.Function<? super U,? extends V> mapper,
java.util.function.Supplier<U> supplier)
Maps the output of an supplier using a function.
|
public static <T> java.util.function.Supplier<T> constant(T t)
T - the type of the supplied valuet - the constantpublic static <U,V> java.util.function.Supplier<V> mapping(java.util.function.Function<? super U,? extends V> mapper,
java.util.function.Supplier<U> supplier)
U - The original suppliers return typeV - The new suppliers return typesupplier - the original suppliermapper - the mapperpublic static <U,V> java.util.function.Function<U,V> asFunction(java.util.function.Supplier<V> supplier)
U - the parameter typeV - the supplier's return typesupplier - the supplierCopyright © 2015–2018 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.