## mars.assembler
Class Symbol

    java.lang.Object
      mars.assembler.Symbol

    public class Symbol

extends Object

Represents a MIPS program identifier to be stored in the symbol table.

Author:
  Jason Bumgarner, Jason Shrewsbury

Field Summary
`static boolean` `DATA_SYMBOL`
`static boolean` `TEXT_SYMBOL`

Constructor Summary
`Symbol(String name, int address, boolean data)` Basic constructor, creates a symbol object.

Method Summary
`int` `getAddress()` Returns the address of the the Symbol.
`String` `getName()` Returns the label of the the Symbol.
`boolean` `getType()` Finds the type of symbol, text or data.
`void` `setAddress(int newAddress)` Sets (replaces) the address of the the Symbol.

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

Field Detail

### TEXT_SYMBOL

    public static final boolean TEXT_SYMBOL

See Also:
  Constant Field Values

### DATA_SYMBOL

    public static final boolean DATA_SYMBOL

See Also:
  Constant Field Values

Constructor Detail

### Symbol

    public Symbol(String name,
                  int address,
                  boolean data)

  Basic constructor, creates a symbol object.

  Parameters:
    `name` - The name of the Symbol.
    `address` - The memroy address that the Symbol refers to.
    `data` - The type of Symbol that it is.

Method Detail

### getAddress

    public int getAddress()

  Returns the address of the the Symbol.

  Returns:
    The address of the Symbol.

### getName

    public String getName()

  Returns the label of the the Symbol.

  Returns:
    The label of the Symbol.

### getType

    public boolean getType()

  Finds the type of symbol, text or data.

  Returns:
    The type of the data.

### setAddress

    public void setAddress(int newAddress)

  Sets (replaces) the address of the the Symbol.

  Parameters:
    `newAddress` - The revised address of the Symbol.