Skip to content

Instantly share code, notes, and snippets.

@arjunsk
Created August 18, 2018 07:20
Show Gist options
  • Save arjunsk/1c228e9f8c7ec7adf5db47aa0b7a62c8 to your computer and use it in GitHub Desktop.
Save arjunsk/1c228e9f8c7ec7adf5db47aa0b7a62c8 to your computer and use it in GitHub Desktop.
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