public final class SimpleValidationMessage extends AbstractValidationMessage
ValidationMessage that just holds a text.| Constructor and Description |
|---|
SimpleValidationMessage(String text)
Constructs a simple warning message for the given text.
|
SimpleValidationMessage(String text,
Severity severity)
Constructs a simple validation message for the given text
and message severity.
|
SimpleValidationMessage(String text,
Severity severity,
Object key)
Constructs a simple validation message for the given text,
message severity, and message key.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Compares the specified object with this validation message for equality.
|
int |
hashCode()
Returns the hash code value for this validation message.
|
formattedText, key, setKey, severity, text, toStringpublic SimpleValidationMessage(String text)
text - a String that describes this warningNullPointerException - if text is null.IllegalArgumentException - if text is empty or whitespacepublic SimpleValidationMessage(String text, Severity severity)
text - describes this messageseverity - the message severity, either error or warningNullPointerException - if text is nullIllegalArgumentException - if text is empty or whitespaceIllegalArgumentException - if severity is OKpublic SimpleValidationMessage(String text, Severity severity, Object key)
text - describes this messageseverity - the message severity, either error or warningkey - the message's keyNullPointerException - if text is nullIllegalArgumentException - if text is empty or whitespaceIllegalArgumentException - if severity is OKpublic boolean equals(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 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 ObjectObject.hashCode()Copyright © 2003-2014 JGoodies Software GmbH. All Rights Reserved.