de.uni_paderborn.robots.robotArenaInterface
Class FieldData

java.lang.Object
  |
  +--de.uni_paderborn.robots.robotArenaInterface.FieldData

public final class FieldData
extends java.lang.Object


This class contains the data for a field and
can have up to one reference to an ItemData Object.
Please be aware that if there is no item on the field "getItem" returns null.


Field Summary
private  int fieldID
          contains the "random", unique ID of the field
private  ItemData item
          contains the reference to an item or null
 
Constructor Summary
FieldData(int fieldID, ItemData item)
          
constructor used to set the attributes

 
Method Summary
 int getFieldID()
          
returns the ID of the field
 ItemData getItem()
          
returns a reference to an ItemData Object or null if the field is empty
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

fieldID

private int fieldID
contains the "random", unique ID of the field

item

private ItemData item
contains the reference to an item or null
Constructor Detail

FieldData

public FieldData(int fieldID,
                 ItemData item)

constructor used to set the attributes

Parameters:
fieldID - unique ID of the field
ItemData - Item on the field
Method Detail

getFieldID

public final int getFieldID()

returns the ID of the field
Returns:
ID of the field

getItem

public final ItemData getItem()

returns a reference to an ItemData Object or null if the field is empty
Returns:
Item on the field