Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.commands
Class QSYSCLParameterTokenizer

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.commands.QSYSCLParameterTokenizer

public class QSYSCLParameterTokenizer
extends Object

Helper class for tokenizing CL parameter string and return each parameter as a token. It handles extra spaces which are valid for some keywords syntax listed below: (1) Spaces inside brackets (). e.g. "keyword( value )" (2) Keywords with multiple values. e.g. option(*value1 *value2) (3) Text keyword which can contain spaces enclosed by single quote. e.g. "keyword(value) text('my text')" would be treated as two tokens: "keyword(value)" and "text('my text')" while the regular StringTokenizer would return three tokens: "keyword(value)", "text('my" and "text')"


Field Summary
static String Copyright
           
 
Constructor Summary
QSYSCLParameterTokenizer(String parameterString, boolean userData)
          Cosntructor
 
Method Summary
 boolean hasMoreTokens()
          Check if there is more token
 String nextToken()
          Get next token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

QSYSCLParameterTokenizer

public QSYSCLParameterTokenizer(String parameterString,
                                boolean userData)
Cosntructor

Parameters:
parameterString - - string to be tokenized
userData - - from user data. For performance reason, the check of space before and after bracket is only done for user data entered on the command line.
Method Detail

hasMoreTokens

public boolean hasMoreTokens()
Check if there is more token

Returns:
boolean - true if there is more token

nextToken

public String nextToken()
Get next token

Returns:
String - next token

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.