Enum TcapOperation.OperationClass
- java.lang.Object
-
- java.lang.Enum<TcapOperation.OperationClass>
-
- 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TcapOperation.OperationClass
fromInt(int c)
int
getClassNumber()
Return the class of operation as an integerboolean
reportsFailure()
Test if this class of operation reports failures.boolean
reportsSuccess()
Test if this class of operation reports success.static TcapOperation.OperationClass
valueOf(String name)
Returns the enum constant of this type with the specified name.static TcapOperation.OperationClass[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLASS1
public static final TcapOperation.OperationClass CLASS1
-
CLASS2
public static final TcapOperation.OperationClass CLASS2
-
CLASS3
public static final TcapOperation.OperationClass CLASS3
-
CLASS4
public static final TcapOperation.OperationClass CLASS4
-
-
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 nameNullPointerException
- 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
-
fromInt
public static TcapOperation.OperationClass fromInt(int c)
-
-