/** * Is the given flag being completed? */ public boolean isFlag(char flag) { return isFlag() && getFlag() == flag; }
/** * If the given flag is being completed, generate suggestions from the given choices, * by throwing a {@link SuggestException}. */ public void suggestFlag(char flag, Iterable<String> choices) throws SuggestException { if(isFlag(flag)) { suggest(choices); } }
/** * Is the given flag being completed? */ public boolean isSuggestingFlag(char flag) { return isSuggesting() && getSuggestionContext().isFlag(flag); }