net.milkbowl.vault.economy
Class EconomyResponse

java.lang.Object
  extended by net.milkbowl.vault.economy.EconomyResponse

public class EconomyResponse
extends java.lang.Object


Nested Class Summary
static class EconomyResponse.ResponseType
          Enum for types of Responses indicating the status of a method call.
 
Field Summary
 double amount
          Amount modified by calling method
 double balance
          New balance of account
 java.lang.String errorMessage
          Error message if the variable 'type' is ResponseType.FAILURE
 EconomyResponse.ResponseType type
          Success or failure of call.
 
Constructor Summary
EconomyResponse(double amount, double balance, EconomyResponse.ResponseType type, java.lang.String errorMessage)
          Constructor for EconomyResponse
 
Method Summary
 boolean transactionSuccess()
          Checks if an operation was successful
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amount

public final double amount
Amount modified by calling method


balance

public final double balance
New balance of account


type

public final EconomyResponse.ResponseType type
Success or failure of call. Using Enum of ResponseType to determine valid outcomes


errorMessage

public final java.lang.String errorMessage
Error message if the variable 'type' is ResponseType.FAILURE

Constructor Detail

EconomyResponse

public EconomyResponse(double amount,
                       double balance,
                       EconomyResponse.ResponseType type,
                       java.lang.String errorMessage)
Constructor for EconomyResponse

Parameters:
amount - Amount modified during operation
balance - New balance of account
type - Success or failure type of the operation
errorMessage - Error message if necessary (commonly null)
Method Detail

transactionSuccess

public boolean transactionSuccess()
Checks if an operation was successful

Returns:
Value


MilkBukkit, 2011