|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.validation.message.AbstractValidationMessage
com.jgoodies.validation.message.SimpleValidationMessage
public final class SimpleValidationMessage
An implementation of ValidationMessage that just holds a text.
It is the minimal validation message, not intended to be subclassed.
| Constructor Summary | |
|---|---|
SimpleValidationMessage(java.lang.String text)
Constructs a simple warning message for the given text. |
|
SimpleValidationMessage(java.lang.String text,
Severity severity)
Constructs a simple validation message for the given text and message severity. |
|
SimpleValidationMessage(java.lang.String text,
Severity severity,
java.lang.Object key)
Constructs a simple validation message for the given text, message severity, and message key. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this validation message for equality. |
int |
hashCode()
Returns the hash code value for this validation message. |
| Methods inherited from class com.jgoodies.validation.message.AbstractValidationMessage |
|---|
formattedText, key, setKey, severity, text, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleValidationMessage(java.lang.String text)
text - a String that describes this warning
java.lang.NullPointerException - if the text is null.
public SimpleValidationMessage(java.lang.String text,
Severity severity)
text - describes this messageseverity - the message severity, either error or warning
java.lang.IllegalArgumentException - if severity is Severity.OK
java.lang.NullPointerException - if the text is null.
public SimpleValidationMessage(java.lang.String text,
Severity severity,
java.lang.Object key)
text - describes this messageseverity - the message severity, either error or warningkey - the message's key
java.lang.IllegalArgumentException - if severity is Severity.OK
java.lang.NullPointerException - if the text is null.| Method Detail |
|---|
public boolean equals(java.lang.Object o)
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.
equals in class java.lang.Objecto - the object to be compared for equality with this validation message.
true if the specified object is equal
to this validation message.Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||