Package ca.phon.phonex
Class FeatureSetMatcher
java.lang.Object
ca.phon.phonex.FeatureSetMatcher
- All Implemented Interfaces:
PhoneMatcher
Class to match phones based on
feature sets.
-
Constructor Summary
ConstructorDescriptionConstructorFeatureSetMatcher
(FeatureSet requiredFeatures) FeatureSetMatcher
(FeatureSet requiredFeatures, FeatureSet notFeatures) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotFeature
(String featureName) Add a feature that is required NOT to be in the given phone's feature set.void
addRequiredFeature
(String featureName) Add a new required feature to the setboolean
Perform test on given phone.boolean
Does 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:PhoneMatcher
Perform test on given phone.- Specified by:
matches
in interfacePhoneMatcher
-
matchesAnything
public boolean matchesAnything()Description copied from interface:PhoneMatcher
Does this matcher match anything? Used at runtime to help determine proper backtracking paths.- Specified by:
matchesAnything
in interfacePhoneMatcher
-
toString
-