|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Severity>
com.jgoodies.validation.Severity
public enum Severity
An enumeration for the severities used in ValidationMessage
.
Useful to categorize validation results, for example to prevent an object
from being saved if the primary key is missing.
The severity is used in almost all views that present validation messages
and is used in operations on instances of
ValidationResult
.
ValidationMessage
,
ValidationResult
Enum Constant Summary | |
---|---|
ERROR
Indicates a problem that cannot be resumed or worked around. |
|
OK
Returned by empty validation results to indicate that no problem has been detected, or in other words, everything is fine. |
|
WARNING
Indicates a problem that can be resumed or handled in a reasonable way. |
Method Summary | |
---|---|
static Severity |
max(Severity severity1,
Severity severity2)
Returns the higher of the given severities by comparing their ordinals. |
static Severity |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Severity[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Severity ERROR
public static final Severity WARNING
public static final Severity OK
Method Detail |
---|
public static Severity[] values()
for (Severity c : Severity.values()) System.out.println(c);
public static Severity valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static Severity max(Severity severity1, Severity severity2)
severity1
- the first severity to checkseverity2
- the second severity to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |