public class ComparatorValidator extends Object
Modifier and Type | Method and Description |
---|---|
static IllegalArgumentException |
checkValidity(Grammar grammar,
Comparator comp)
Checks whether the given Comparator supports all OperationType the given Grammar
requires and returns an IllegalArgumentException if it does not.
|
static boolean |
isValid(Grammar grammar,
Comparator comp)
Returns true if and only if the given Comparator supports all OperationType the given
Grammar requires.
|
static void |
validate(Grammar grammar,
Comparator comp)
Checks whether the given Comparator supports all OperationType the given Grammar
requires and throws an IllegalArgumentException if it does not.
|
public static boolean isValid(@NonNull Grammar grammar, @NonNull Comparator comp)
grammar
- a Grammar.comp
- a Comparator.public static void validate(@NonNull Grammar grammar, @NonNull Comparator comp) throws IllegalArgumentException
grammar
- a Grammar.comp
- a Comparator.IllegalArgumentException
- if at least one required OperationType is not supported by
the given Comparator.public static IllegalArgumentException checkValidity(@NonNull Grammar grammar, @NonNull Comparator comp)
grammar
- a Grammar.comp
- a Comparator.Copyright (C) 2016 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/