public class Map
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Map(MapData md,
int[] fi,
FieldData[] fd)
Constructs a Map object with a MapData object that describes the map, an index of labelled fields
and an array of FieldData objects that describe the fields within the map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if the given object is a Map equivalent to this one.
|
Field |
field(int index)
Returns the field at the given index within this map.
|
Field |
field(int row,
int column)
Returns the field at the given row and column within this map.
|
java.lang.String[] |
getFieldLabels()
Returns the names of the fields.
|
java.lang.String |
getName()
Returns the name of the map.
|
Screen |
getScreen()
Returns the screen associated with this map.
|
boolean |
isValid()
Returns true if map is currently valid.
|
void |
setScreen(Screen s)
Sets the screen associated with this map and check if it is valid.
|
java.lang.String |
toString()
Returns a String representation of the Map.
|
public Map(MapData md, int[] fi, FieldData[] fd)
md
- a MapData object describing this mapfi
- an index of labelled fieldsfd
- an array of FieldData objects describing the fields in this mappublic boolean isValid()
public void setScreen(Screen s)
s
- the screenpublic Screen getScreen()
public Field field(int index)
index
- the index of the required fieldpublic Field field(int row, int column)
row
- the rowcolumn
- the columnpublic java.lang.String getName()
public java.lang.String[] getFieldLabels()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- an Objectpublic java.lang.String toString()
toString
in class java.lang.Object