com.jeantessier.commandline
Class AtMostParameterStrategy

java.lang.Object
  |
  +--com.jeantessier.commandline.AtMostParameterStrategy
All Implemented Interfaces:
CountingParameterStrategy, ParameterStrategy, Visitable

public class AtMostParameterStrategy
extends java.lang.Object
implements CountingParameterStrategy

The command-line can include at most a certain number of parameters or the framework will find the command-line invalid.


Constructor Summary
AtMostParameterStrategy(int nbParameters)
           
 
Method Summary
 boolean accept(java.lang.String param)
           
 void accept(Visitor visitor)
           
 int getCount()
           
 int getNbParameters()
           
 boolean isSatisfied()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtMostParameterStrategy

public AtMostParameterStrategy(int nbParameters)
Method Detail

accept

public boolean accept(java.lang.String param)
Specified by:
accept in interface ParameterStrategy

isSatisfied

public boolean isSatisfied()
Specified by:
isSatisfied in interface ParameterStrategy

getNbParameters

public int getNbParameters()
Specified by:
getNbParameters in interface CountingParameterStrategy

getCount

public int getCount()
Specified by:
getCount in interface CountingParameterStrategy

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Visitable


Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.