Enum TcapOperation.OperationClass

  • All Implemented Interfaces:
    Serializable, Comparable<TcapOperation.OperationClass>
    Enclosing class:
    TcapOperation

    public static enum TcapOperation.OperationClass
    extends Enum<TcapOperation.OperationClass>
    Enum for TCAP Class of Operation, as defined in ITU Q.773.
    • CLASS1: Operation returns both success (result) and failure (error)
    • CLASS2: Operation returns failure (error) only
    • CLASS3: Operation returns success (result) only
    • CLASS4: Operation does not return a result or error
    • Method Detail

      • values

        public static TcapOperation.OperationClass[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TcapOperation.OperationClass c : TcapOperation.OperationClass.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TcapOperation.OperationClass valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • reportsSuccess

        public boolean reportsSuccess()
        Test if this class of operation reports success.
        Returns:
        true iff this is Class 1 or 3, i.e. reports success
      • reportsFailure

        public boolean reportsFailure()
        Test if this class of operation reports failures.
        Returns:
        true iff this is Class 1 or 2, i.e. reports failures
      • getClassNumber

        public int getClassNumber()
        Return the class of operation as an integer
        Returns:
        the class of operation, e.g. CLASS3 returns 3