Created
July 5, 2020 11:14
-
-
Save theboreddev/be921f8d4aad6c5e0c23e7fcabe7b26f to your computer and use it in GitHub Desktop.
newstrategy
This file contains hidden or 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
final Item item = new Item(1L, new BigDecimal("12.99")); | |
System.out.println("Delivery price is " + Plan.BASIC.deliveryPrice.apply(item)); | |
System.out.println("Delivery price is " + Plan.PREMIUM.deliveryPrice.apply(item)); | |
System.out.println("Delivery price is " + Plan.BUSINESS.deliveryPrice.apply(item)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment