VALIDATABLE - A data type for an AnnotationRule and
a View for a QuickRule.public abstract class Rule<VALIDATABLE>
extends java.lang.Object
AnnotationRule and
QuickRule.| Modifier and Type | Field and Description |
|---|---|
protected int |
mSequence |
| Modifier | Constructor and Description |
|---|---|
protected |
Rule(int sequence)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
getMessage(android.content.Context context)
Returns a failure message associated with the rule.
|
int |
getSequence()
Returns the sequence of the
Rule. |
abstract boolean |
isValid(VALIDATABLE validatable)
Checks if the rule is valid.
|
protected Rule(int sequence)
sequence - The sequence number for this Rule.public abstract boolean isValid(VALIDATABLE validatable)
validatable - Element on which the validation is applied, could be a data type or a
View.public abstract java.lang.String getMessage(android.content.Context context)
context - Any Context instance, usually an
Activity.public final int getSequence()
Rule.