com.jivesoftware.profiles.validator
Class RangeValidator
java.lang.Object
com.jivesoftware.profiles.validator.RangeValidator
- All Implemented Interfaces:
- ProfileFieldValidator, Cacheable, java.io.Serializable
public class RangeValidator
- extends java.lang.Object
- implements ProfileFieldValidator, Cacheable
A validator which validates using a range of acceptable values.
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object o)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
java.lang.String[] |
getRange()
|
int |
hashCode()
|
void |
setRange(java.lang.String[] range)
|
java.lang.String |
toString()
|
java.lang.String |
validate(java.lang.String value,
User user)
Performs field validation on user supplied input. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RangeValidator
public RangeValidator()
validate
public java.lang.String validate(java.lang.String value,
User user)
- Description copied from interface:
ProfileFieldValidator
- Performs field validation on user supplied input. Returns null if validation succeeds or an
error string if validation fails.
- Specified by:
validate
in interface ProfileFieldValidator
- Parameters:
value
- the user supplied value. If no value has been provided by the user then the
value should be null.user
- the user supplying the value, or null if anonymous.
- Returns:
- null if validation succeeds or an error string if validation fails.
getRange
public java.lang.String[] getRange()
setRange
public void setRange(java.lang.String[] range)
getCachedSize
public int getCachedSize()
- Description copied from interface:
Cacheable
- Returns the approximate size of the Object in bytes. The size should be
considered to be a best estimate of how much memory the Object occupies
and may be based on empirical trials or dynamic calculations.
- Specified by:
getCachedSize
in interface Cacheable
- Returns:
- the size of the Object in bytes.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1999-2006 Jive Software.