public static class TagConflictResolutionUtil.AutomaticChoice extends java.lang.Object
AutomaticChoice
s are grouped into TagConflictResolutionUtil.AutomaticChoiceGroup
.Modifier and Type | Field and Description |
---|---|
java.lang.String |
description
A free description.
|
java.lang.String |
group
The name of the {link AutomaticChoice group} this choice belongs to.
|
boolean |
isRegex
If regular expression must be used to match the Tag key or the value.
|
java.lang.String |
key
The Tag key to match.
|
java.lang.String |
score
The score to give to this choice in order to choose the best value
Natural String ordering is used to identify the best score.
|
java.lang.String |
value
The Tag value to match.
|
Constructor and Description |
---|
AutomaticChoice()
Default constructor.
|
AutomaticChoice(java.lang.String key,
java.lang.String group,
java.lang.String description,
boolean isRegex,
java.lang.String value,
java.lang.String score)
Instantiate a particular choice from a group for automatic tag conflict resolution.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
computeScoreFromValue(java.lang.String v)
Return the score associated to this choice for the given Tag value.
|
boolean |
matchesValue(java.lang.String v)
Check if this choice match the given Tag value.
|
java.lang.String |
toString() |
public java.lang.String key
public java.lang.String group
public java.lang.String description
public boolean isRegex
public java.lang.String value
public java.lang.String score
public AutomaticChoice()
public AutomaticChoice(java.lang.String key, java.lang.String group, java.lang.String description, boolean isRegex, java.lang.String value, java.lang.String score)
key
- The Tag key to match.group
- The name of the {link AutomaticChoice group} this choice belongs to.description
- A free description.isRegex
- If regular expression must be used to match the Tag key or the value.value
- The Tag value to match.score
- The score to give to this choice in order to choose the best value.public boolean matchesValue(java.lang.String v)
v
- the Tag value to match.public java.lang.String computeScoreFromValue(java.lang.String v)
match
this choice.v
- the Tag value of which to get the score.java.util.regex.PatternSyntaxException
- if the regular expression syntax is invalidpublic java.lang.String toString()
toString
in class java.lang.Object