com.hps.integrator.infrastructure.utils.HpsEnumUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secure-submit Show documentation
Show all versions of secure-submit Show documentation
The SecureSubmit Java SDK simplifies processing of credit card transactions using Heartland Payment Systems' Portico Payment Gateway
package com.hps.integrator.infrastructure.utils;
import com.hps.integrator.abstractions.IByteConstant;
import com.hps.integrator.abstractions.IStringConstant;
public class HpsEnumUtils {
public static & IByteConstant> boolean isDefined(Class valueType, byte value){
return parse(valueType, value) != null;
}
public static & IByteConstant> V parse(Class valueType, byte value) {
ReverseByteEnumMap map = new ReverseByteEnumMap(valueType);
return map.get(value);
}
public static & IStringConstant> V parse(Class valueType, String value) {
ReverseStringEnumMap map = new ReverseStringEnumMap(valueType);
return map.get(value);
}
}