net.robotmedia.billing
Enum ResponseCode

java.lang.Object
  extended by java.lang.Enum<ResponseCode>
      extended by net.robotmedia.billing.ResponseCode
All Implemented Interfaces:
Serializable, Comparable<ResponseCode>

public enum ResponseCode
extends Enum<ResponseCode>

Possible response codes from billing service


Enum Constant Summary
RESULT_BILLING_UNAVAILABLE
           
RESULT_DEVELOPER_ERROR
           
RESULT_ERROR
           
RESULT_ITEM_UNAVAILABLE
           
RESULT_OK
           
RESULT_SERVICE_UNAVAILABLE
           
RESULT_USER_CANCELED
           
 
Method Summary
static boolean isOk(int response)
           
static ResponseCode valueOf(int response)
           
static ResponseCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ResponseCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RESULT_OK

public static final ResponseCode RESULT_OK

RESULT_USER_CANCELED

public static final ResponseCode RESULT_USER_CANCELED

RESULT_SERVICE_UNAVAILABLE

public static final ResponseCode RESULT_SERVICE_UNAVAILABLE

RESULT_BILLING_UNAVAILABLE

public static final ResponseCode RESULT_BILLING_UNAVAILABLE

RESULT_ITEM_UNAVAILABLE

public static final ResponseCode RESULT_ITEM_UNAVAILABLE

RESULT_DEVELOPER_ERROR

public static final ResponseCode RESULT_DEVELOPER_ERROR

RESULT_ERROR

public static final ResponseCode RESULT_ERROR
Method Detail

values

public static ResponseCode[] 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 (ResponseCode c : ResponseCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ResponseCode 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

isOk

public static boolean isOk(int response)

valueOf

@Nonnull
public static ResponseCode valueOf(int response)


Copyright © 2013. All Rights Reserved.