Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mars.simulator
Class ProgramArgumentList

    java.lang.Object
      mars.simulator.ProgramArgumentList

    public class ProgramArgumentList

extends Object

Models Program Arguments, one or more strings provided to the MIPS program at runtime. Equivalent to C's main(int argc, char **argv) or Java's main(String[] args).

Author:
  Pete Sanderson

Constructor Summary
`ProgramArgumentList(ArrayList list)` Constructor that gets list from ArrayList of String, one argument per element.
`ProgramArgumentList(ArrayList list, int startPosition)` Constructor that gets list from section of String ArrayList, one argument per element.
`ProgramArgumentList(String args)` Constructor that parses string to produce list.
`ProgramArgumentList(String[] list)` Constructor that gets list from String array, one argument per element.
`ProgramArgumentList(String[] list, int startPosition)` Constructor that gets list from section of String array, one argument per element.

Method Summary
`void` | `storeProgramArguments()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProgramArgumentList

    public ProgramArgumentList(String args)

  Constructor that parses string to produce list. Delimiters are the default Java StringTokenizer delimiters (space, tab, newline, return, formfeed)

  Parameters:
    `args` - String containing delimiter-separated arguments

### ProgramArgumentList

    public ProgramArgumentList(String[] list)

  Constructor that gets list from String array, one argument per element.

  Parameters:
    `list` - Array of String, each element containing one argument

### ProgramArgumentList

    public ProgramArgumentList(String[] list,
                               int startPosition)

  Constructor that gets list from section of String array, one argument per element.

  Parameters:
    `args` - Array of String, each element containing one argument
    `startPosition` - Index of array element containing the first argument; all remaining elements are assumed to contain an argument.

### ProgramArgumentList

    public ProgramArgumentList(ArrayList list)

  Constructor that gets list from ArrayList of String, one argument per element.

  Parameters:
    `list` - ArrayList of String, each element containing one argument

### ProgramArgumentList

    public ProgramArgumentList(ArrayList list,
                               int startPosition)

  Constructor that gets list from section of String ArrayList, one argument per element.

  Parameters:
    `args` - ArrayList of String, each element containing one argument
    `startPosition` - Index of array element containing the first argument; all remaining elements are assumed to contain an argument.

Method Detail

### storeProgramArguments

    public void storeProgramArguments()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD