-
Notifications
You must be signed in to change notification settings - Fork 12
Implementing a keyword factory class
Benjamin Schmid edited this page Sep 15, 2020
·
1 revision
Implementing a keyword factory class is simple and straightforward:
public class ExtKeywordFactory implements IKeywordFactory {
private static ExtKeywordFactory instance = null;
private ExtKeywordFactory() {}
public static ExtKeywordFactory getInstance() {
if(instance == null)
instance = new ExtKeywordFactory();
return instance;
}
@Override
public Keyword[] getNonChannelKeywords() {
return ExtKeyword.values();
}
@Override
public Keyword[] getChannelKeywords() {
return null;
}
}