|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.text.MatchElement
org.pf.text.MatchAttribute
public class MatchAttribute
An instance of this class holds the name and the pattern values for one attribute. With the matches() method it can be checked against a Map of attributes.
| Field Summary | |
|---|---|
static int |
OPERATOR_EQUALS
The operator value for EQUALS |
static int |
OPERATOR_GREATER
The operator value for GREATER |
static int |
OPERATOR_GREATER_OR_EQUAL
The operator value for GREATER OR EQUAL |
static int |
OPERATOR_LESS
The operator value for LESS |
static int |
OPERATOR_LESS_OR_EQUAL
The operator value for LESS OR EQUAL |
| Constructor Summary | |
|---|---|
MatchAttribute()
Initialize the new instance with default values. |
|
MatchAttribute(java.lang.String name)
Initialize the new instance with a name. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAttributeName()
Returns the name of the attribute that will be checked by this rule element |
StringPattern[] |
getPatterns()
Returns the value pattern(s) against that will be matched |
boolean |
ignoreCaseInName()
Returns true, if the attribute name should be treated not case-sensitive. |
boolean |
isAttribute()
Returns true, if the element is an attribute element. |
void |
setAttributeName(java.lang.String newValue)
Sets the name of the attribute that will be checked by this rule element |
void |
setDatatype(java.lang.Object type)
Sets the datatype this attribute's value must have. |
void |
setEqualsOperator()
Sets the operator for value comparisons of this attribute to EQUALS. |
void |
setGreaterOperator()
Sets the operator for value comparisons of this attribute to GREATER. |
void |
setGreaterOrEqualOperator()
Sets the operator for value comparisons of this attribute to GREATER OR EQUAL. |
void |
setLessOperator()
Sets the operator for value comparisons of this attribute to LESS. |
void |
setLessOrEqualOperator()
Sets the operator for value comparisons of this attribute to LESS OR EQUAL. |
void |
setPattern(StringPattern aPattern)
Sets the specified pattern as the sole pattern to be checked when matching this attribute against a map. |
void |
setPatterns(StringPattern[] newValue)
Sets the value pattern(s) against that will be matched |
java.lang.String |
toString()
Returns a string containing the attribute name, the operator and the value(s) set in this part of a match rule. |
| Methods inherited from class org.pf.text.MatchElement |
|---|
getAnd, getNot, isGroup, matches, setAnd, setNot |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int OPERATOR_EQUALS
public static final int OPERATOR_GREATER
public static final int OPERATOR_LESS
public static final int OPERATOR_GREATER_OR_EQUAL
public static final int OPERATOR_LESS_OR_EQUAL
| Constructor Detail |
|---|
public MatchAttribute()
public MatchAttribute(java.lang.String name)
name - The name of the attribute| Method Detail |
|---|
public java.lang.String getAttributeName()
public void setAttributeName(java.lang.String newValue)
public StringPattern[] getPatterns()
public void setPatterns(StringPattern[] newValue)
public boolean ignoreCaseInName()
public boolean isAttribute()
isAttribute in class MatchElementpublic void setPattern(StringPattern aPattern)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setEqualsOperator()
public void setGreaterOperator()
public void setLessOperator()
public void setGreaterOrEqualOperator()
public void setLessOrEqualOperator()
public void setDatatype(java.lang.Object type)
throws MatchRuleException
Currently supported datatypes are:
type - The type of the attribute's value
MatchRuleException - if the current value (pattern) cannot be converted to the specified datatype
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||