public class ComparatorValidator extends Object
Modifier and Type | Method and Description |
---|---|
static <X,Y> IllegalArgumentException |
checkValidity(AlignmentAlgorithm<X,Y,?> algorithm,
Comparator<? extends X,? extends Y> comp)
Checks whether the given Comparator supports all OperationType the given AlignmentAlgorithm
requires and returns an IllegalArgumentException if it does not.
|
static <X,Y> boolean |
isValid(AlignmentAlgorithm<X,Y,?> algorithm,
Comparator<? extends X,? extends Y> comp)
Returns true if and only if the given Comparator supports all OperationType the given
AlignmentAlgorithm requires.
|
static <X,Y> void |
validate(AlignmentAlgorithm<X,Y,?> algorithm,
Comparator<? extends X,? extends Y> comp)
Checks whether the given Comparator supports all OperationType the given AlignmentAlgorithm
requires and throws an IllegalArgumentException if it does not.
|
public static <X,Y> boolean isValid(@NonNull AlignmentAlgorithm<X,Y,?> algorithm, @NonNull Comparator<? extends X,? extends Y> comp)
X
- the class of elements in left-hand sequences for the given AlignmentAlgorithm.Y
- the class of elements in right-hand sequences for the given AlignmentAlgorithm.algorithm
- an AlignmentAlgorithm.comp
- a Comparator.public static <X,Y> void validate(@NonNull AlignmentAlgorithm<X,Y,?> algorithm, @NonNull Comparator<? extends X,? extends Y> comp) throws IllegalArgumentException
X
- the class of elements in left-hand sequences for the given AlignmentAlgorithm.Y
- the class of elements in right-hand sequences for the given AlignmentAlgorithm.algorithm
- an AlignmentAlgorithm.comp
- a Comparator.IllegalArgumentException
- if at least one required OperationType is not supported by
the given Comparator.public static <X,Y> IllegalArgumentException checkValidity(@NonNull AlignmentAlgorithm<X,Y,?> algorithm, @NonNull Comparator<? extends X,? extends Y> comp)
X
- the class of elements in left-hand sequences for the given AlignmentAlgorithm.Y
- the class of elements in right-hand sequences for the given AlignmentAlgorithm.algorithm
- an AlignmentAlgorithm.comp
- a Comparator.Copyright (C) 2016-2018 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/