com.charliedog.argv
Interface Argument

All Known Implementing Classes:
BooleanArgument, ListArgument, NumberArgument, PairArgument, StringArgument

public interface Argument

Interface for arguments that may be registered and parsed by the ArgumentParser.


Method Summary
 int parse(java.util.List values)
          Must check whether values begins with this argument.
 void printUsage(java.io.PrintWriter out)
          Must write a description of the usage of this argument to out.
 

Method Detail

parse

public int parse(java.util.List values)
Must check whether values begins with this argument. If it does, this method must return the remainder of the list after all elements belonging to this argument have been removed. Otherwise, values must be returned without modification. ArgumentParser.parse( values ) will invoke this method once for each possible starting position of this argument in values.


printUsage

public void printUsage(java.io.PrintWriter out)
Must write a description of the usage of this argument to out. This description should be one line long.