public class Field
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
a
To differ fields one may use (a=0) or (b=1).
|
static int |
b
To differ fields one may use (a=0) or (b=1).
|
| Modifier | Constructor and Description |
|---|---|
|
Field(AddressingMode mode,
int value)
Constructs Field of addressingMode and integer value.
|
protected |
Field(AddressingMode mode,
java.lang.String label)
Constructs Field of addressingMode and label.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getLabel()
Returns the label string of the field.
|
AddressingMode |
getMode()
Gets AddressingMode of the field.
|
int |
getValue()
Gets the integer value of the field if possible.
|
protected java.lang.String |
getVariable()
Returns the variable string if there is one, or else it returns an empty
string.
|
protected boolean |
hasLable()
Returns true if the field has a label and false if not.
|
protected boolean |
isVariable()
Returns true if field is variable and therefore has no integer value.
|
void |
setValue(int value)
Sets or replaces the integer value of the field.
|
java.lang.String |
toString()
Returns a string of the fields content.
|
public static final int a
public static final int b
public Field(AddressingMode mode, int value)
mode - AddressingMode value of the Fieldvalue - int which is going to be field value.protected Field(AddressingMode mode, java.lang.String label)
mode - AddressingMode value of the Fieldlabel - must contain letters onlyprotected boolean isVariable()
protected java.lang.String getVariable()
public void setValue(int value)
value - Should fit the outside context.protected boolean hasLable()
protected java.lang.String getLabel()
public AddressingMode getMode()
public int getValue()
throws java.io.IOException
java.io.IOException - if there is no integer value.public java.lang.String toString()
toString in class java.lang.Object