Package gov.aps.jca

Class CASeverity


  • public class CASeverity
    extends ValuedEnum
    Enumeration class representing Channel Access severity codes.
    Author:
    Eric Boucher
    • 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.