Created
August 19, 2020 13:27
-
-
Save appkr/fc2a1da2e7332a4702fabebf9d544fe1 to your computer and use it in GitHub Desktop.
methods in Java Enum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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