T1 - The type of the first object to compare.T2 - The type of the second object to compare.public abstract static class CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> extends Delegate
| Modifier and Type | Class and Description |
|---|---|
static interface |
CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2>
A functional interface for the containing delegate type.
|
| Constructor and Description |
|---|
ComparisonOfDifferentTypes()
Creates a new instance of this delegate.
|
ComparisonOfDifferentTypes(Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke a static method on a class.
|
ComparisonOfDifferentTypes(Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke an instance method on a class instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract int |
invoke(T1 x,
T2 y)
Represents a method that compares two objects of different types.
|
static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> |
of(CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f)
Create a delegate for the given interface.
|
static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> |
of(CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f,
Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> |
of(CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f,
Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
public ComparisonOfDifferentTypes()
public ComparisonOfDifferentTypes(@Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetObject - The class instance on which the delegate will invoke the method.methodName - The name of the instance method.methodParameterClasses - The type of the parameters of the instance method.public ComparisonOfDifferentTypes(@Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetClass - The class that defines the method.methodName - The name of the static method.methodParameterClasses - The type of the parameters of the static method.public abstract int invoke(T1 x, T2 y)
x - The first object to compare.y - The second object to compare.x is less than y, greater than zero if
x is greater than y, and zero if x
equals y.@Nonnull public static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> of(@Nonnull CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f)
f - The function which will be invoked.@Nonnull public static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> of(@Nonnull CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f, @Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f - The function which will be invoked.targetObject - The class instance on which the delegate will invoke the method.methodName - The name of the instance method.methodParameterClasses - The type of the parameters of the instance method.@Nonnull public static <T1,T2> CollectionAlgorithms.ComparisonOfDifferentTypes<T1,T2> of(@Nonnull CollectionAlgorithms.ComparisonOfDifferentTypes.Function<T1,T2> f, @Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f - The function which will be invoked.targetClass - The class that defines the method.methodName - The name of the static method.methodParameterClasses - The type of the parameters of the static method.