public class Enums {
    public Enums() {
    }

    public static enum xxMaskingOption {
        XX_NAME,
        XX_KRNAME,
        XX_FRN,
        XX_BARCODE;
        
        private xxMaskingOption() {
        }
    }

    public static enum ooMaskingOption {
        OO_NAME,
        OO_RRN,
        OO_PHOTO,
        OO_ISSUEDATE,
        OO_EXPIREDATE,
        OO_ADDRESS,

        private ooMaskingOption() {
        }
    }
}

// 사용방법
Enums.xxMaskingOption mlMasking = Enums.xxMaskingOption.XX_FRN;

int index = mlMasking.ordinal(); // 2
String name = mlMasking.toString(); // "XX_FRN"


public enum EncryptionType {
    xxxx("xxxx"),
    oooo("oooo");

    private EncryptionType(String type) {
    }
}

// 사용방법
EncryptionType type = EncryptionType.xxxx;

int index = type.ordinal(); // 0
String name = type.toString(); // "xxxx"

 

 

 

+ Recent posts