public class SupplierUtil extends Object
Modifier and Type | Field and Description |
---|---|
static Supplier<DefaultEdge> |
DEFAULT_EDGE_SUPPLIER
Supplier for
DefaultEdge . |
static Supplier<DefaultWeightedEdge> |
DEFAULT_WEIGHTED_EDGE_SUPPLIER
Supplier for
DefaultWeightedEdge . |
static Supplier<Object> |
OBJECT_SUPPLIER
Supplier for
Object . |
Constructor and Description |
---|
SupplierUtil() |
Modifier and Type | Method and Description |
---|---|
static Supplier<DefaultEdge> |
createDefaultEdgeSupplier()
Create a default edge supplier.
|
static Supplier<DefaultWeightedEdge> |
createDefaultWeightedEdgeSupplier()
Create a default weighted edge supplier.
|
static Supplier<Integer> |
createIntegerSupplier()
Create an integer supplier which returns a sequence starting from zero.
|
static Supplier<Integer> |
createIntegerSupplier(int start)
Create an integer supplier which returns a sequence starting from a specific numbers.
|
static Supplier<Long> |
createLongSupplier()
Create a long supplier which returns a sequence starting from zero.
|
static Supplier<Long> |
createLongSupplier(long start)
Create a long supplier which returns a sequence starting from a specific numbers.
|
static Supplier<String> |
createRandomUUIDStringSupplier()
Create a string supplier which returns random UUIDs.
|
static Supplier<String> |
createStringSupplier()
Create a string supplier which returns unique strings.
|
static Supplier<String> |
createStringSupplier(int start)
Create a string supplier which returns unique strings.
|
static <T> Supplier<T> |
createSupplier(Class<? extends T> clazz)
Create a supplier from a class which calls the default constructor.
|
public static final Supplier<DefaultEdge> DEFAULT_EDGE_SUPPLIER
DefaultEdge
.public static final Supplier<DefaultWeightedEdge> DEFAULT_WEIGHTED_EDGE_SUPPLIER
DefaultWeightedEdge
.public static <T> Supplier<T> createSupplier(Class<? extends T> clazz)
T
- the type of results supplied by this supplierclazz
- the classpublic static Supplier<DefaultEdge> createDefaultEdgeSupplier()
public static Supplier<DefaultWeightedEdge> createDefaultWeightedEdgeSupplier()
public static Supplier<Integer> createIntegerSupplier()
public static Supplier<Integer> createIntegerSupplier(int start)
start
- where to start the sequencepublic static Supplier<Long> createLongSupplier()
public static Supplier<Long> createLongSupplier(long start)
start
- where to start the sequencepublic static Supplier<String> createStringSupplier()
public static Supplier<String> createRandomUUIDStringSupplier()
Copyright © 2019. All rights reserved.