Class VersionFunctionBuilder<T,V>
java.lang.Object
de.eldoria.eldoutilities.crossversion.builder.VersionFunctionBuilder<T,V>
- Direct Known Subclasses:
BiFunctionBuilder
,FunctionBuilder
,QuadFunctionBuilder
,TriFunctionBuilder
Interface to create different function builders.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddExclusiveVersion
(Version oldest, Version newest, V function) Add a version functions for all versions between two versions.addInclusiveVersion
(Version oldest, Version newest, V function) Add a version functions for all versions between two versions.addVersion
(VersionRange version, V function) Add a version function which should be used on one or more versions.addVersionFunction
(V function, VersionRange version) Deprecated, for removal: This API element is subject to removal in a future version.addVersionFunctionBetween
(Version oldest, Version newest, V function) Deprecated, for removal: This API element is subject to removal in a future version.static <A,
B, R> BiFunctionBuilder<A, B, R> biFunctionBuilder
(Class<A> a, Class<B> b, Class<R> r) Get a bi function builderabstract T
build()
Build the version function.static <A,
R> FunctionBuilder<A, R> functionBuilder
(Class<A> a, Class<R> r) Get a function builder.static <A,
B, C, D, R>
QuadFunctionBuilder<A,B, C, D, R> Get a quad function builder.static <A,
B, C, R> TriFunctionBuilder<A, B, C, R> triFunctionBuilder
(Class<A> a, Class<B> b, Class<C> c, Class<R> r) Get a tri function builder.
-
Field Details
-
functions
-
-
Constructor Details
-
VersionFunctionBuilder
public VersionFunctionBuilder()
-
-
Method Details
-
functionBuilder
Get a function builder.- Type Parameters:
A
- first input typeR
- result type- Parameters:
a
- first input type classr
- result type class- Returns:
- a new function builder instance
-
biFunctionBuilder
public static <A,B, BiFunctionBuilder<A,R> B, biFunctionBuilderR> (Class<A> a, Class<B> b, Class<R> r) Get a bi function builder- Type Parameters:
A
- first input typeB
- second input typeR
- result type- Parameters:
a
- first input type classb
- second input type classr
- result type class- Returns:
- a new bi function builder instance
-
triFunctionBuilder
public static <A,B, TriFunctionBuilder<A,C, R> B, triFunctionBuilderC, R> (Class<A> a, Class<B> b, Class<C> c, Class<R> r) Get a tri function builder.- Type Parameters:
A
- first input typeB
- second input typeC
- third input typeR
- result type- Parameters:
a
- first input type classb
- second input type classc
- third input type classr
- result type class- Returns:
- new tri function builder instance
-
quadFunctionBuilder
public static <A,B, QuadFunctionBuilder<A,C, D, R> B, quadFunctionBuilderC, D, R> (Class<A> a, Class<B> b, Class<C> c, Class<D> d, Class<R> r) Get a quad function builder.- Type Parameters:
A
- first input typeB
- second input typeC
- third input typeD
- fourth input typeR
- result type- Parameters:
a
- first input type classb
- second input type classc
- third input type classd
- fourth input type classr
- result type class- Returns:
- new quad function builder instance
-
addVersionFunction
@Deprecated(forRemoval=true) public VersionFunctionBuilder<T,V> addVersionFunction(V function, VersionRange version) Deprecated, for removal: This API element is subject to removal in a future version.Add a version function which should be used on one or more versions.- Parameters:
function
- function to executeversion
- versions which should use this function- Returns:
- builder instance with function applied for versions
-
addVersion
Add a version function which should be used on one or more versions.- Parameters:
function
- function to executeversion
- versions which should use this function- Returns:
- builder instance with function applied for versions
-
addVersionFunctionBetween
@Deprecated(forRemoval=true) public VersionFunctionBuilder<T,V> addVersionFunctionBetween(Version oldest, Version newest, V function) Deprecated, for removal: This API element is subject to removal in a future version.Add a version functions for all versions between two versions.- Parameters:
oldest
- oldest version (inclusive)newest
- newest version (exclusive)function
- function to execute- Returns:
- builder instance with function applied for versions
-
addExclusiveVersion
Add a version functions for all versions between two versions.- Parameters:
oldest
- oldest version (inclusive)newest
- newest version (exclusive)function
- function to execute- Returns:
- builder instance with function applied for versions
-
addInclusiveVersion
Add a version functions for all versions between two versions.- Parameters:
oldest
- oldest version (inclusive)newest
- newest version (inclusive)function
- function to execute- Returns:
- builder instance with function applied for versions
-
build
Build the version function.- Returns:
- version functions with applied functions for versions.
-