com.townleyenterprises.command
Class RequiredOptionConstraint
java.lang.Object
  
com.townleyenterprises.command.OptionConstraint
      
com.townleyenterprises.command.RequiredOptionConstraint
- public class RequiredOptionConstraint
- extends OptionConstraint
  
This class provides an implementation of a constraint which
 requires the specific option to be matched.
- Since:
 
  - 3.0
 
- Version:
 
  - $Id: RequiredOptionConstraint.java,v 1.1 2004/07/30 16:20:22 atownley Exp $
 
- Author:
 
  - Andrew S. Townley
 
 
| 
Method Summary | 
 java.lang.String | 
getMessage()
 
            | 
 boolean | 
isOK()
 
          This method should be implemented by derived classes to
 perform the constraint check. | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
RequiredOptionConstraint
public RequiredOptionConstraint(int status,
                                CommandOption opt)
- The constructor initializes the option being constrained
 and an exit status.
 - Parameters:
 status - the status codeopt - the option being constrained
RequiredOptionConstraint
public RequiredOptionConstraint(int status,
                                CommandOption opt,
                                java.lang.String message)
- The constructor initializes the option being constrained,
 an exit status and message to be used during failure.
 - Parameters:
 status - the status codeopt - the option being constrained
getMessage
public java.lang.String getMessage()
- Overrides:
 getMessage in class OptionConstraint
 
 
isOK
public boolean isOK()
- Description copied from class: 
OptionConstraint 
- This method should be implemented by derived classes to
 perform the constraint check.
- Specified by:
 isOK in class OptionConstraint
 
- Returns:
 - true if the constraint is valid; false otherwise
 
 
 
Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises.  All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.