Package gov.aps.jca
Class CASeverity
- java.lang.Object
-
- gov.aps.jca.Enum
-
- gov.aps.jca.ValuedEnum
-
- gov.aps.jca.CASeverity
-
public class CASeverity extends ValuedEnum
Enumeration class representing Channel Access severity codes.- Author:
- Eric Boucher
-
-
Field Summary
Fields Modifier and Type Field Description static CASeverityERRORFailed-continue.static CASeverityFATALfatal.static CASeverityINFOSuccessful.static CASeveritySEVEREfailed-quit.static CASeveritySUCCESSSuccessful.static CASeverityWARNINGUnsuccessful.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCASeverity(String name, int value)Creates a new instance of CASeverity
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CASeverityforName(String name)Return the CASeverity corresponding to specific name.static CASeverityforValue(int value)Return the CASeverity corresponding to specific numerical value.booleanisError()Tests whether this CASeverity represent an error code.booleanisFatal()Tests whether this CASeverity represents a fatal code.booleanisSuccessful()tests whether this CASeverity represent a successful code.-
Methods inherited from class gov.aps.jca.ValuedEnum
getValue, isEqualTo, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual, toString
-
-
-
-
Field Detail
-
WARNING
public static final CASeverity WARNING
Unsuccessful.
-
SUCCESS
public static final CASeverity SUCCESS
Successful.
-
ERROR
public static final CASeverity ERROR
Failed-continue.
-
INFO
public static final CASeverity INFO
Successful.
-
SEVERE
public static final CASeverity SEVERE
failed-quit.
-
FATAL
public static final CASeverity FATAL
fatal.
-
-
Constructor Detail
-
CASeverity
protected CASeverity(String name, int value)
Creates a new instance of CASeverity- Parameters:
name- The name of the Severity code.value- the numerical value of the severity.
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
tests whether this CASeverity represent a successful code.- Returns:
- true if this severity value represent a successful operation.
-
isError
public boolean isError()
Tests whether this CASeverity represent an error code.- Returns:
- true if this severity value represent an error.
-
isFatal
public boolean isFatal()
Tests whether this CASeverity represents a fatal code.- Returns:
- true if this severity value represent an fatal error.
-
forName
public static CASeverity forName(String name)
Return the CASeverity corresponding to specific name.- Parameters:
name- the name of the CASeverity to look for.- Returns:
- the corresponding CASeverity if it exists, null otherwise.
-
forValue
public static final CASeverity forValue(int value)
Return the CASeverity corresponding to specific numerical value.- Parameters:
value- the value of the CASeverity to look for.- Returns:
- the corresponding CASeverity if it exists, null otherwise.
-
-