Created
August 18, 2018 07:20
-
-
Save arjunsk/1c228e9f8c7ec7adf5db47aa0b7a62c8 to your computer and use it in GitHub Desktop.
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
package factories; | |
import android_widget.DialogueBox; | |
import nougat_products.NougatErrorDialogueBox; | |
import nougat_products.NougatInfoDialogueBox; | |
public class NougatFactory implements IFactory { | |
@Override | |
public DialogueBox createDialogue(String type) { | |
if(type.equalsIgnoreCase("info")) | |
return new NougatInfoDialogueBox(); | |
else if(type.equalsIgnoreCase("error")) | |
return new NougatErrorDialogueBox(); | |
else | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment