Last active
November 10, 2018 15:05
-
-
Save kasundharmadasa/632ea2573801874e36710c017ae56036 to your computer and use it in GitHub Desktop.
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
package com.sample; | |
import com.sample.model.LiquorType; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Created by kasun on 5/24/17. | |
*/ | |
public class LiquorService { | |
public List getAvailableBrands(LiquorType type){ | |
List brands = new ArrayList(); | |
if(type.equals(LiquorType.WINE)){ | |
brands.add("Adrianna Vineyard"); | |
brands.add(("J. P. Chenet")); | |
}else if(type.equals(LiquorType.WHISKY)){ | |
brands.add("Glenfiddich"); | |
brands.add("Johnnie Walker"); | |
}else if(type.equals(LiquorType.BEER)){ | |
brands.add("Corona"); | |
}else { | |
brands.add("No Brand Available"); | |
} | |
return brands; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment