Class FeatureSetMatcher
java.lang.Object
ca.phon.phonex.FeatureSetMatcher
- All Implemented Interfaces:
PhoneMatcher
Class to match phones based on
feature sets.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorFeatureSetMatcher(FeatureSet requiredFeatures) FeatureSetMatcher(FeatureSet requiredFeatures, FeatureSet notFeatures) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotFeature(String featureName) Add a feature that is required NOT to be in the given phone's feature set.voidaddRequiredFeature(String featureName) Add a new required feature to the setbooleanPerform test on given phone.booleanDoes this matcher match anything? Used at runtime to help determine proper backtracking paths.toString()
-
Constructor Details
-
FeatureSetMatcher
public FeatureSetMatcher()Constructor -
FeatureSetMatcher
-
FeatureSetMatcher
-
-
Method Details
-
addRequiredFeature
Add a new required feature to the set- Parameters:
featureName-- Throws:
IllegalArgumentException- if the given feature name is not a valid feature
-
addNotFeature
Add a feature that is required NOT to be in the given phone's feature set.- Parameters:
featureName-- Throws:
IllegalArgumentException- if the given feature name is not a vaild feature.
-
matches
Description copied from interface:PhoneMatcherPerform test on given phone.- Specified by:
matchesin interfacePhoneMatcher
-
matchesAnything
public boolean matchesAnything()Description copied from interface:PhoneMatcherDoes this matcher match anything? Used at runtime to help determine proper backtracking paths.- Specified by:
matchesAnythingin interfacePhoneMatcher
-
toString
-