Skip to content

Instantly share code, notes, and snippets.

@kasundharmadasa
Last active November 10, 2018 15:05
Show Gist options
  • Save kasundharmadasa/632ea2573801874e36710c017ae56036 to your computer and use it in GitHub Desktop.
Save kasundharmadasa/632ea2573801874e36710c017ae56036 to your computer and use it in GitHub Desktop.
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