public abstract class ValueDiscriminator extends java.lang.Object implements DiscriminatorXML
Discriminator
for a rule that applies based on
a comparison of two values.
Concrete subclasses of this class specify the kind of value and how
the value from the DataView
must relate to this value
for the DiscriminatorRule
to apply.
For example, a NumberValueDiscriminator
can specify
that a DiscriminatorRule
should apply to data values greater
than 500,000.
This class defines constants for the following relational operators:
=, <, <=, >, >=, >, and !=.
This class is abstract because it does not define the
applies
method from the Discriminator
interface.
Discriminators that extend this class must implement the method.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
a_relOperator |
protected static java.lang.String |
eq |
static int |
EQ
Equals (=).
|
protected static java.lang.String |
ge |
static int |
GE
Greater than or equal to (>=).
|
protected static java.lang.String |
gt |
static int |
GT
Greater than (>).
|
protected static java.lang.String |
le |
static int |
LE
Less than or equal to (<=).
|
protected static java.lang.String |
lt |
static int |
LT
Less than (<).
|
protected int |
m_relOperator |
protected static java.lang.String |
ne |
static int |
NE
Not equal (!=).
|
protected static java.lang.String |
s_relOperator |
Constructor and Description |
---|
ValueDiscriminator()
Constructor that does not take an operator.
|
ValueDiscriminator(int relOp)
Constructor that initializes the relational operator.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone()
Clones this
ValueDiscriminator . |
protected int |
convertRelOperatorToInt(java.lang.String rel) |
protected java.lang.String |
convertRelOperatorToString(int rel) |
int |
getRelOperator()
Retrieves the relational operator for this
ValueDiscriminator . |
void |
setRelOperator(int relOp)
Specifies the relational operator for this.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getXML, setXML
applies
protected int m_relOperator
public static final int EQ
RuleContext
) must equal the
right operand (from this ValueDiscriminator
).public static final int LT
RuleContext
) must be less
than the right operand (from this ValueDiscriminator
).
For dates, the left operand must be earlier than the right operand.public static final int LE
RuleContext
) must be less than
or equal to the right operand (from this ValueDiscriminator
).
For dates, the left operand must be earlier than or equal to the right
operand.public static final int GT
RuleContext
) must be greater
than the right operand (from this ValueDiscriminator
).
For dates, the left operand must be later than the right operand.public static final int GE
RuleContext
) must be greater
than or equal to the right operand (from this
ValueDiscriminator
).
For dates, the left operand must be later than or equal to the right
operand.public static final int NE
RuleContext
) must not equal the
right operand (from this ValueDiscriminator
).protected static final java.lang.String a_relOperator
protected static final java.lang.String eq
protected static final java.lang.String le
protected static final java.lang.String lt
protected static final java.lang.String ge
protected static final java.lang.String gt
protected static final java.lang.String ne
protected static final java.lang.String s_relOperator
public ValueDiscriminator()
setRelOperator
method to specify the relational operator for this
ValueDiscriminator
.public ValueDiscriminator(int relOp)
relOp
- A constant that represents the relational operator
to use in this ValueDiscriminator
.public abstract java.lang.Object clone()
ValueDiscriminator
.clone
in interface Discriminator
clone
in class java.lang.Object
ValueDiscriminator
public int getRelOperator()
ValueDiscriminator
.public void setRelOperator(int relOp)
ValueDiscriminator
.protected int convertRelOperatorToInt(java.lang.String rel)
protected java.lang.String convertRelOperatorToString(int rel)