| java.lang.Object com.jgoodies.validation.message.AbstractValidationMessage com.jgoodies.validation.message.SimpleValidationMessage
SimpleValidationMessage | final public class SimpleValidationMessage extends AbstractValidationMessage (Code) | | An implementation of
ValidationMessage that just holds a text.
It is the minimal validation message, not intended to be subclassed.
author: Karsten Lentzsch version: $Revision: 1.7 $ |
Method Summary | |
public boolean | equals(Object o) Compares the specified object with this validation message for equality.
Returns true if and only if the specified object is also
a simple validation message, both messages have the same severity,
key, and formatted text. | public int | hashCode() Returns the hash code value for this validation message. |
SimpleValidationMessage | public SimpleValidationMessage(String text)(Code) | | Constructs a simple warning message for the given text.
Parameters: text - a String that describes this warning throws: NullPointerException - if the text is null . |
SimpleValidationMessage | public SimpleValidationMessage(String text, Severity severity)(Code) | | Constructs a simple validation message for the given text
and message severity.
Parameters: text - describes this message Parameters: severity - the message severity, either error or warning throws: IllegalArgumentException - if severity is Severity.OK throws: NullPointerException - if the text is null . |
SimpleValidationMessage | public SimpleValidationMessage(String text, Severity severity, Object key)(Code) | | Constructs a simple validation message for the given text,
message severity, and message key.
Parameters: text - describes this message Parameters: severity - the message severity, either error or warning Parameters: key - the message's key throws: IllegalArgumentException - if severity is Severity.OK throws: NullPointerException - if the text is null . |
equals | public boolean equals(Object o)(Code) | | Compares the specified object with this validation message for equality.
Returns true if and only if the specified object is also
a simple validation message, both messages have the same severity,
key, and formatted text. In other words, two simple validation messages
are defined to be equal if and only if they behave one like the other.
This implementation first checks if the specified object is this
a simple validation message. If so, it returns true ;
if not, it checks if the specified object is a simple validation message.
If not, it returns false ; if so, it checks and returns
if the severities, keys and formatted texts of both messages are equal.
Parameters: o - the object to be compared for equality with this validation message. true if the specified object is equalto this validation message. See Also: Object.equals(java.lang.Object) |
hashCode | public int hashCode()(Code) | | Returns the hash code value for this validation message.
This implementation computes and returns the hash based
on the hash code values of this messages' severity, key,
and text.
the hash code value for this validation message. See Also: Object.hashCode |
|
|