Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
methods in Java Enum
// @see https://github.com/madvirus/ddd-start
public enum OrderState {
PAYMENT_WAITING {
public boolean isShippingChangeable() {
return true;
}
}, PREPARING {
public boolean isShippingChangeable() {
return true;
}
},
SHIPPED, DELIVERING, DELIVERY_COMPLETED, CANCELED;
public boolean isShippingChangeable() {
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment