net.dpml.cli

Interface Group

All Superinterfaces:
Option
Known Implementing Classes:
GroupImpl

public interface Group
extends Option

An Option representing a choice or group of Options in the form "-a|-b|-c".

Method Summary

void
appendUsage(StringBuffer buffer, Set helpSettings, Comparator comp, String separator)
Appends usage information to the specified StringBuffer
int
getMaximum()
Retrieves the maximum number of members acceptable for a valid Group
int
getMinimum()
Retrieves the minimum number of members required for a valid Group
boolean
isRequired()
Indicates whether group members must be present for the CommandLine to be valid.

Methods inherited from interface net.dpml.cli.Option

appendUsage, canProcess, canProcess, defaults, findOption, getDescription, getId, getPreferredName, getPrefixes, getTriggers, helpLines, isRequired, process, validate

Method Details

appendUsage

public void appendUsage(StringBuffer buffer,
                        Set helpSettings,
                        Comparator comp,
                        String separator)
Appends usage information to the specified StringBuffer
Parameters:
buffer - the buffer to append to
helpSettings - a set of display settings @see DisplaySetting
comp - a comparator used to sort the Options
separator - the String used to separate member Options

getMaximum

public int getMaximum()
Retrieves the maximum number of members acceptable for a valid Group
Returns:
the maximum number of members

getMinimum

public int getMinimum()
Retrieves the minimum number of members required for a valid Group
Returns:
the minimum number of members

isRequired

public boolean isRequired()
Indicates whether group members must be present for the CommandLine to be valid.
Specified by:
isRequired in interface Option
Returns:
true iff the CommandLine will be invalid without at least one member option