Skip to content

Instantly share code, notes, and snippets.

@arjunsk
Created August 18, 2018 07:19
Show Gist options
  • Save arjunsk/4d04973871555f0d3e16f5519f2fb314 to your computer and use it in GitHub Desktop.
Save arjunsk/4d04973871555f0d3e16f5519f2fb314 to your computer and use it in GitHub Desktop.
package factories;
import android_widget.DialogueBox;
import lollipop_products.LollipopErrorDialogueBox;
import lollipop_products.LollipopInfoDialogueBox;
public class LollipopFactory implements IFactory{
@Override
public DialogueBox createDialogue(String type) {
if(type.equalsIgnoreCase("info"))
return new LollipopInfoDialogueBox();
else if(type.equalsIgnoreCase("error"))
return new LollipopErrorDialogueBox();
else
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment