Skip to content

Instantly share code, notes, and snippets.

@appkr
Created August 19, 2020 13:27
Show Gist options
  • Save appkr/fc2a1da2e7332a4702fabebf9d544fe1 to your computer and use it in GitHub Desktop.
Save appkr/fc2a1da2e7332a4702fabebf9d544fe1 to your computer and use it in GitHub Desktop.
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