RegoDocumentType.getByValue(createOrderRequest.getIdDocument().getIdType())
createOrderRequest.getIdDocument().getIdType()
public enum RegoDocumentType { NRIC_11B("NRIC/11B", IdentityType.NRIC.toValue()), FIN("Employment Pass", IdentityType.EM_PASS.toValue()), ; private static final Map<String, RegoDocumentType> BY_SMAG_VALUE = new HashMap<>(); static { for (RegoDocumentType identityType : values()) { BY_SMAG_VALUE.put(identityType.getSmagValue().toLowerCase(), identityType); } } private final String smagValue; private final String regoValue; RegoDocumentType(String smagValue, String regoValue) { this.smagValue = smagValue; this.regoValue = regoValue; } public String getSmagValue() { return smagValue; } public String getRegoValue() { return regoValue; } public static RegoDocumentType getBySmagValue(String smagValue) { return BY_SMAG_VALUE.get(smagValue.toLowerCase()); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)