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:
Serializable,Comparable<DataTransactionResult.Type>
- Enclosing class:
- DataTransactionResult
public static enum DataTransactionResult.Type extends Enum<DataTransactionResult.Type>
The type of transaction result.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLEDAn operation was cancelled by a third party (eg.ERRORTheValueoperation failed because an unexpected condition occurred.FAILURETheValueoperation failed for an expected reason (such as theValuebeing incompatible with theDataHolder.SUCCESSThe item data operation succeeded.UNDEFINEDThe actual result of the operation is undefined, this probably indicates that something went wrong with the operation that theValuecouldn't handle or didn't expect.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataTransactionResult.TypevalueOf(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
TheValueoperation failed for an expected reason (such as theValuebeing incompatible with theDataHolder. The condition of theValueis 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(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
-
-