DateOption.java

package com.tradecloud.dto.api.shipment;

public enum DateOption {
    EST_AT_POD("Estimated Arrival at POD"),
    CREATED("Shipment Created"),
    BILL_OF_LADING("Bill of Lading");

    private final String value;

    DateOption(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static DateOption fromValue(String v) {
        for (DateOption c: DateOption.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }
}