com.realtime.crossfire.jxclient.skin.io
Class Args

java.lang.Object
  extended by com.realtime.crossfire.jxclient.skin.io.Args

public class Args
extends java.lang.Object

Iterates over a list of String arguments.


Field Summary
private  java.lang.String[] args
          The string arguments.
private  int index
          The current index into args.
 
Constructor Summary
Args(java.lang.String[] args)
          Creates a new instance.
 
Method Summary
 java.lang.String get()
          Returns the next argument.
 java.lang.String getPrev()
          Returns the current argument.
 boolean hasMore()
          Returns whether more arguments exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

args

@NotNull
private final java.lang.String[] args
The string arguments.


index

private int index
The current index into args.

Constructor Detail

Args

public Args(@NotNull
            java.lang.String[] args)
Creates a new instance.

Parameters:
args - the string arguments
Method Detail

get

@NotNull
public java.lang.String get()
                     throws java.io.IOException
Returns the next argument.

Returns:
the next argument
Throws:
java.io.IOException - if no next argument exists

getPrev

@NotNull
public java.lang.String getPrev()
Returns the current argument. This is the same value that was returned by the preceding call to get().

Returns:
the current argument

hasMore

public boolean hasMore()
Returns whether more arguments exist.

Returns:
whether more arguments exist