ritopt API Documentation
by Damian Eads

gnu.dtools.ritopt
Class ArrayOption

java.lang.Object
  |
  +--gnu.dtools.ritopt.Option
        |
        +--gnu.dtools.ritopt.ArrayOption
All Implemented Interfaces:
OptionArrayable, OptionModifiable

public abstract class ArrayOption
extends Option
implements OptionArrayable

The principal base class used to register option variables that represent arrays or Collections. Array options are useful for options which represent path lists or file specifications.

The preferred derived sub-class implementation is to provide a constructor with a single array parameter to allow for simple registration. For example, an ArrayOption derived class for int arrays should implement the following constructor and accessor.

   MyIntArrayOption( int array[] );
   int[] getValue();
 
Although this has no affect on option processing, following this philosophy for the public interfaces make it easier for the programmer to use your source code.
 Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved.

 ritopt is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 ritopt is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with ritopt; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 

Author:
Damian Ryan Eads

Fields inherited from class gnu.dtools.ritopt.Option
DEFAULT_FILE_COMMENT_SIZE, DEFAULT_FILE_COMPLETE_OPTION_SIZE, DEFAULT_HELP_DEPRECATED_SIZE, DEFAULT_HELP_DESCRIPTION_SIZE, DEFAULT_HELP_OPTION_SIZE, DEFAULT_HELP_TYPENAME_SIZE, DEFAULT_MENU_DEPRECATED_SIZE, DEFAULT_MENU_DESCRIPTION_SIZE, DEFAULT_MENU_OPTION_SIZE, DEFAULT_MENU_TYPENAME_SIZE, invoked
 
Constructor Summary
ArrayOption()
          Builds and initializes ArrayOption class members, and invokes the Option constructor.
 
Method Summary
abstract  java.lang.Object[] getObjectArray()
          Get an ArrayOption in array form.
 java.util.List getObjectList()
          Get a list of objects representing the elements of this array option.
 
Methods inherited from class gnu.dtools.ritopt.Option
action, deprecate, getDescription, getFileCommentSize, getFileCompleteOptionSize, getHashKey, getHashKey, getHashKey, getHashKey, getHelp, getHelpDeprecated, getHelpDeprecatedSize, getHelpDescription, getHelpDescriptionSize, getHelpHeader, getHelpOptionSpecification, getHelpOptionSpecificationSize, getHelpTypeName, getHelpTypenameSize, getLongOption, getMenuDeprecatedSize, getMenuDescriptionSize, getMenuOptionSpecificationSize, getMenuTypenameSize, getName, getObject, getOptionFileLine, getShortOption, getStringValue, getTypeName, isDeprecated, isInvoked, setDeprecated, setDescription, setFileCommentSize, setFileCompleteOptionSize, setHelpDeprecatedSize, setHelpDescriptionSize, setHelpOptionSpecificationSize, setHelpTypenameSize, setInvoked, setKey, setKey, setLongOption, setMenuDeprecatedSize, setMenuDescriptionSize, setMenuOptionSpecificationSize, setMenuTypenameSize, setShortOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gnu.dtools.ritopt.OptionArrayable
modify
 
Methods inherited from interface gnu.dtools.ritopt.OptionModifiable
modify
 

Constructor Detail

ArrayOption

public ArrayOption()
Builds and initializes ArrayOption class members, and invokes the Option constructor.
Method Detail

getObjectArray

public abstract java.lang.Object[] getObjectArray()
Get an ArrayOption in array form. If the option value is an array of primitive values, references to wrapper objects are returned.
Returns:
An array of objects representing the option's value.

getObjectList

public java.util.List getObjectList()
Get a list of objects representing the elements of this array option.
Returns:
A list of objects representing the option's value.

Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved.
SourceForge Logo