package policy.price; public enum ProductPriceLevel { ProductLine(1), Product(2), SKU(3); private int level; public int getLevel() { return this.level; } private ProductPriceLevel(int level) { this.level = level; } public static ProductPriceLevel parseTypeCode(String typeCode) { if (typeCode == null) { return SKU; } typeCode = typeCode.toLowerCase(); if ("customer-productline-price".equals(typeCode)) return ProductLine; if ("customer-product-price".equals(typeCode)) return Product; if (("standard-sku-price".equals(typeCode)) || ("Customer-sku-Price".equals(typeCode))) { return SKU; } return SKU; } }