public class TypeMatchingRuleSet
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypeMatchingRuleSet.CharacterRule
Allows the character rules to say what they do.
|
Modifier and Type | Field and Description |
---|---|
static TypeMatchingRuleSet |
ignoreCaseSpacesSpecial
A convenience set that ignores case, spaces and special characters.
|
private ArrayList<TypeMatchRule> |
rules |
Constructor and Description |
---|
TypeMatchingRuleSet(TypeMatchingRuleSet.CharacterRule... ruleList)
Create a set of rules according to the rules in the list.
|
Modifier and Type | Method and Description |
---|---|
void |
addRule(TypeMatchRule rule)
Add a rule to this set.
|
boolean |
contains(TypeMatchRule rule)
Determine whether a particular rule is in the set.
|
ArrayList<TypeMatchRule> |
getRules()
Get the list of rules currently in the set
|
void |
removeRule(TypeMatchRule rule)
Remove a particular rule from the set.
|
String |
toString()
Creates a human-readable version of the rule set.
|
String |
transformByRules(TypeHierarchy h,
String value)
Use the hierarchy's set of rules to transform the string.
|
private ArrayList<TypeMatchRule> rules
public static TypeMatchingRuleSet ignoreCaseSpacesSpecial
public TypeMatchingRuleSet(TypeMatchingRuleSet.CharacterRule... ruleList)
ruleList
- a sequence of character rule values (may be empty)TypeMatchingRules#addRule(kb.hierarchy.TypeMatchRule)
public ArrayList<TypeMatchRule> getRules()
public boolean contains(TypeMatchRule rule)
public void removeRule(TypeMatchRule rule)
public void addRule(TypeMatchRule rule)
rule
- public String transformByRules(TypeHierarchy h, String value)
public String toString()
toString
in class Object