Package org.spongepowered.api.data
Enum DataTransactionResult.Type
- java.lang.Object
-
- java.lang.Enum<DataTransactionResult.Type>
-
- org.spongepowered.api.data.DataTransactionResult.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DataTransactionResult.Type>
- Enclosing class:
- DataTransactionResult
public static enum DataTransactionResult.Type extends java.lang.Enum<DataTransactionResult.Type>
The type of transaction result.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLED
An operation was cancelled by a third party (eg.ERROR
TheValue
operation failed because an unexpected condition occurred.FAILURE
TheValue
operation failed for an expected reason (such as theValue
being incompatible with theDataHolder
.SUCCESS
The item data operation succeeded.UNDEFINED
The actual result of the operation is undefined, this probably indicates that something went wrong with the operation that theValue
couldn't handle or didn't expect.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataTransactionResult.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DataTransactionResult.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final DataTransactionResult.Type UNDEFINED
-
SUCCESS
public static final DataTransactionResult.Type SUCCESS
The item data operation succeeded.
-
FAILURE
public static final DataTransactionResult.Type FAILURE
TheValue
operation failed for an expected reason (such as theValue
being incompatible with theDataHolder
. The condition of theValue
is unchanged.
-
ERROR
public static final DataTransactionResult.Type ERROR
-
CANCELLED
public static final DataTransactionResult.Type CANCELLED
-
-
Method Detail
-
values
public static DataTransactionResult.Type[] 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 (DataTransactionResult.Type c : DataTransactionResult.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataTransactionResult.Type valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-