Sharkysoft home

lava.util
Class ArgumentEnumerator

java.lang.Object
  |
  +--lava.util.ArgumentEnumerator

public class ArgumentEnumerator
extends java.lang.Object

Enumerates command-line arguments.

Details: ArgumentEnumerator provides a simple mechanism for walking through the string arguments provided to your application's main class.

To use ArgumentEnumerator, simply construct an instance using the original argument array, and then walk through the arguments using the next method.

Since:
2001.04.24
Author:
Sharky

Constructor Summary
ArgumentEnumerator(java.lang.String[] ipsArgs)
          Sets argument array.
 
Method Summary
 java.lang.String next()
          Returns next argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgumentEnumerator

public ArgumentEnumerator(java.lang.String[] ipsArgs)
Sets argument array.

Details: This constructor sets the argument array that will be walked. Normally, this will be the same argument array passed into your application's main method.

Parameters:
ipsArgs - the argument array
Method Detail

next

public java.lang.String next()
Returns next argument.

Details: next returns the next argument in the argument array. When there are no more argument, next returns null.

Returns:
the next argument

Sharkysoft home