|
||||||||||
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
A minimal implementation of ValidationMessage
that just holds a text.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
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(String text)
text
- a String that describes this warning
NullPointerException
- if text
is null
.public SimpleValidationMessage(String text, Severity severity)
text
- describes this messageseverity
- the message severity, either error or warning
NullPointerException
- if text
is null
IllegalArgumentException
- if severity
is OK
public SimpleValidationMessage(String text, Severity severity, Object key)
text
- describes this messageseverity
- the message severity, either error or warningkey
- the message's key
NullPointerException
- if text
is null
IllegalArgumentException
- if severity
is OK
Method Detail |
---|
public 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 Object
o
- 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 Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |