package iapp.classifiers;
 
public class PaymentFormClassifier 
    implements java.io.Serializable, iapp.services.Classifier {
 
    public static final PaymentFormClassifier BRANDED_CREDIT_CARD = new PaymentFormClassifier("R");
    public static final PaymentFormClassifier BRANDED_DEBIT_CHECKING_CARD = new PaymentFormClassifier("E");
    public static final PaymentFormClassifier BRANDED_DEBIT_SAVING_CARD = new PaymentFormClassifier("V");
    public static final PaymentFormClassifier UNBRANDED_DEBIT_CHECKING_CARD = new PaymentFormClassifier("D");
    public static final PaymentFormClassifier UNBRANDED_DEBIT_SAVING_CARD = new PaymentFormClassifier("I");
    public static final PaymentFormClassifier PAYMENT_CARD_CREDIT = new PaymentFormClassifier("X");
    public static final PaymentFormClassifier PAYMENT_CARD_DEBIT = new PaymentFormClassifier("Y");
    public static final PaymentFormClassifier CHECKING = new PaymentFormClassifier("C");
    public static final PaymentFormClassifier SAVINGS = new PaymentFormClassifier("S");
    public static final PaymentFormClassifier FOOD_STAMP = new PaymentFormClassifier("F");
    public static final PaymentFormClassifier CASH_BENEFIT = new PaymentFormClassifier("H");
    public static final PaymentFormClassifier GIFT_CARD = new PaymentFormClassifier("G");
    public static final PaymentFormClassifier FLEET_CARD = new PaymentFormClassifier("L");
    public static final PaymentFormClassifier CASH = new PaymentFormClassifier("A");
    public static final PaymentFormClassifier CHECK = new PaymentFormClassifier("K");
    public static final PaymentFormClassifier PAY_PAL = new PaymentFormClassifier("P");
    public static final PaymentFormClassifier PAY_PAL = new PaymentFormClassifier("P");
    public static final PaymentFormClassifier PAY_PAL = new PaymentFormClassifier("P");
    public static final PaymentFormClassifier PAYMENT_REQUEST = new PaymentFormClassifier("PR");
 
    private static final java.util.Map values = new java.util.TreeMap();
    private static java.util.List literals = new java.util.ArrayList(3);
    private static java.util.List names = new java.util.ArrayList(3);
 
    /**
     * Initializes the values.
     */
    static {
        values.put(BRANDED_CREDIT_CARD.value, BRANDED_CREDIT_CARD);
	literals.add(BRANDED_CREDIT_CARD.value);
	BRANDED_CREDIT_CARD.setName("BRANDED_CREDIT_CARD");
        names.add("BRANDED_CREDIT_CARD");
        values.put(BRANDED_DEBIT_CHECKING_CARD.value, BRANDED_DEBIT_CHECKING_CARD);
	literals.add(BRANDED_DEBIT_CHECKING_CARD.value);
	BRANDED_DEBIT_CHECKING_CARD.setName("BRANDED_DEBIT_CHECKING_CARD");
        names.add("BRANDED_DEBIT_CHECKING_CARD");
        values.put(BRANDED_DEBIT_SAVING_CARD.value, BRANDED_DEBIT_SAVING_CARD);
	literals.add(BRANDED_DEBIT_SAVING_CARD.value);
	BRANDED_DEBIT_SAVING_CARD.setName("BRANDED_DEBIT_SAVING_CARD");
        names.add("BRANDED_DEBIT_SAVING_CARD");
        values.put(UNBRANDED_DEBIT_CHECKING_CARD.value, UNBRANDED_DEBIT_CHECKING_CARD);
	literals.add(UNBRANDED_DEBIT_CHECKING_CARD.value);
	UNBRANDED_DEBIT_CHECKING_CARD.setName("UNBRANDED_DEBIT_CHECKING_CARD");
        names.add("UNBRANDED_DEBIT_CHECKING_CARD");
        values.put(UNBRANDED_DEBIT_SAVING_CARD.value, UNBRANDED_DEBIT_SAVING_CARD);
	literals.add(UNBRANDED_DEBIT_SAVING_CARD.value);
	UNBRANDED_DEBIT_SAVING_CARD.setName("UNBRANDED_DEBIT_SAVING_CARD");
        names.add("UNBRANDED_DEBIT_SAVING_CARD");
        values.put(PAYMENT_CARD_CREDIT.value, PAYMENT_CARD_CREDIT);
	literals.add(PAYMENT_CARD_CREDIT.value);
	PAYMENT_CARD_CREDIT.setName("PAYMENT_CARD_CREDIT");
        names.add("PAYMENT_CARD_CREDIT");
        values.put(PAYMENT_CARD_DEBIT.value, PAYMENT_CARD_DEBIT);
	literals.add(PAYMENT_CARD_DEBIT.value);
	PAYMENT_CARD_DEBIT.setName("PAYMENT_CARD_DEBIT");
        names.add("PAYMENT_CARD_DEBIT");
        values.put(CHECKING.value, CHECKING);
	literals.add(CHECKING.value);
	CHECKING.setName("CHECKING");
        names.add("CHECKING");
        values.put(SAVINGS.value, SAVINGS);
	literals.add(SAVINGS.value);
	SAVINGS.setName("SAVINGS");
        names.add("SAVINGS");
        values.put(FOOD_STAMP.value, FOOD_STAMP);
	literals.add(FOOD_STAMP.value);
	FOOD_STAMP.setName("FOOD_STAMP");
        names.add("FOOD_STAMP");
        values.put(CASH_BENEFIT.value, CASH_BENEFIT);
	literals.add(CASH_BENEFIT.value);
	CASH_BENEFIT.setName("CASH_BENEFIT");
        names.add("CASH_BENEFIT");
        values.put(GIFT_CARD.value, GIFT_CARD);
	literals.add(GIFT_CARD.value);
	GIFT_CARD.setName("GIFT_CARD");
        names.add("GIFT_CARD");
        values.put(FLEET_CARD.value, FLEET_CARD);
	literals.add(FLEET_CARD.value);
	FLEET_CARD.setName("FLEET_CARD");
        names.add("FLEET_CARD");
        values.put(CASH.value, CASH);
	literals.add(CASH.value);
	CASH.setName("CASH");
        names.add("CASH");
        values.put(CHECK.value, CHECK);
	literals.add(CHECK.value);
	CHECK.setName("CHECK");
        names.add("CHECK");
        values.put(PAY_PAL.value, PAY_PAL);
	literals.add(PAY_PAL.value);
	PAY_PAL.setName("PAY_PAL");
        names.add("PAY_PAL");
        values.put(PAY_PAL.value, PAY_PAL);
	literals.add(PAY_PAL.value);
	PAY_PAL.setName("PAY_PAL");
        names.add("PAY_PAL");
        values.put(PAY_PAL.value, PAY_PAL);
	literals.add(PAY_PAL.value);
	PAY_PAL.setName("PAY_PAL");
        names.add("PAY_PAL");
        values.put(PAYMENT_REQUEST.value, PAYMENT_REQUEST);
	literals.add(PAYMENT_REQUEST.value);
	PAYMENT_REQUEST.setName("PAYMENT_REQUEST");
        names.add("PAYMENT_REQUEST");
        literals = java.util.Collections.unmodifiableList(literals);
        names = java.util.Collections.unmodifiableList(names);
    }
 
	private java.lang.String value;
	private java.lang.String name;
 
	/**
     * The default constructor allowing super classes to access it.
     */
    protected PaymentFormClassifier() {}
 
    private PaymentFormClassifier(java.lang.String value) {
        this.value = value;
    }
 
	public String toString() {
        return java.lang.String.valueOf(value);
    }
 
    /**
     * Creates an instance of PaymentFormClassifier from <code>value</code>.
     *
     * @param value the value to create the PaymentFormClassifier from.
     */
    public static PaymentFormClassifier fromString(java.lang.String value) {
        if(value == null) return null;
		final PaymentFormClassifier typeValue = (PaymentFormClassifier) values.get(value);
        if (typeValue == null) {
            throw new IllegalArgumentException("invalid value '" + value + "', possible values are: " + literals);
        }
        return typeValue;
    }
 
	/**
	* Checks correct value for the classifier
	*/
	public boolean isPaymentFormClassifier(java.lang.String value){
	  return (value == null || values.get(value) != null);
	}
    /**
     * Get/set for value
     */
    public java.lang.String getValue() {
        return this.value;
    }
    public java.lang.String getName() {
        return this.name;
    }
    /**
     * Get/set for name
     */
    private void setName(java.lang.String name) {
        this.name = name;
    }
    /**
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    public int compareTo(Object that)
    {
        return (this == that) ? 0 : this.getValue().compareTo(((PaymentFormClassifier)that).getValue());
    }
 
    public static java.util.Map getValues() {
        return values;
    }
 
    /**
     * Returns an unmodifiable list containing the literals that are known by this enumeration.
     *
     * @return A List containing the actual literals defined by this enumeration, this list
     *         can not be modified.
     */
    public static java.util.List literals() {
        return literals;
    }
 
    /**
     * Returns an unmodifiable list containing the names of the literals that are known
     * by this enumeration.
     *
     * @return A List containing the actual names of the literals defined by this
     *         enumeration, this list can not be modified.
     */
    public static java.util.List names() {
        return names;
    }
 
    /**
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object object) {
        return (this == object)
            || (object instanceof PaymentFormClassifier && ((PaymentFormClassifier)object).getValue().equals(
                this.getValue()));
    }
 
    /**
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        return this.getValue().hashCode();
    }
 
    /**
     * This method allows the deserialization of an instance of this enumeration type to return the actual instance
     * that will be the singleton for the JVM in which the current thread is running.
     * <p/>
     * Doing this will allow users to safely use the equality operator <code>==</code> for enumerations because
     * a regular deserialized object is always a newly constructed instance and will therefore never be
     * an existing reference; it is this <code>readResolve()</code> method which will intercept the deserialization
     * process in order to return the proper singleton reference.
     */
    private java.lang.Object readResolve() throws java.io.ObjectStreamException {
        return PaymentFormClassifier.fromString(this.value);
    }
 
}