Jadex 0.96

jadex.examples.marsworld
Class Target

java.lang.Object
  extended by jadex.examples.marsworld.LocationObjectData
      extended by jadex.examples.marsworld.LocationObject
          extended by jadex.examples.marsworld.TargetData
              extended by jadex.examples.marsworld.Target
All Implemented Interfaces:
Serializable, nuggets.INugget

public class Target
extends TargetData

The target is a map position

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface nuggets.INugget
nuggets.INugget.Helper
 
Constructor Summary
Target()
          Create a new target.
Target(Location loc, int initialcapacity)
          Create a new target.
 
Method Summary
 int getCapacity()
          Getter for capacity
 int getInitialcapacity()
          Getter for initialcapacity
 int getOre()
          Get the amount of ore.
 int getOreCapacity()
          Get the capacity of ore.
 boolean isMarked()
          Test if target was visited.
 boolean isOre()
          Test if target can produce some ore.
 void produceOre(int ore)
          Change the amount of ore at the Location
 int retrieveOre(int amount)
          Retrieve some ore amount.
 void setCapacity(int capacity)
          Setter for capacity.
 void setInitialcapacity(int initialcapacity)
          Setter for initialcapacity.
 void setMarked()
          Mark this target as visited.
 void setMarked(boolean marked)
          Setter for marked.
 void setOre(int ore)
          Setter for ore.
 String toString()
          Convert the Location to a string representation.
 
Methods inherited from class jadex.examples.marsworld.TargetData
_persist, _set
 
Methods inherited from class jadex.examples.marsworld.LocationObject
equals
 
Methods inherited from class jadex.examples.marsworld.LocationObjectData
getId, getLocation, setId, setLocation
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Target

public Target()
Create a new target. Empty bean constructor.


Target

public Target(Location loc,
              int initialcapacity)
Create a new target.

Method Detail

produceOre

public void produceOre(int ore)
Change the amount of ore at the Location

Parameters:
ore - The produced ore.

retrieveOre

public int retrieveOre(int amount)
Retrieve some ore amount.

Parameters:
amount - The amount.

getOreCapacity

public int getOreCapacity()
Get the capacity of ore.

Returns:
The amount of Ore

getOre

public int getOre()
Get the amount of ore.

Returns:
The amount of Ore

setMarked

public void setMarked()
Mark this target as visited.


isMarked

public boolean isMarked()
Test if target was visited.

Returns:
True if already visited.

isOre

public boolean isOre()
Test if target can produce some ore.

Returns:
true if target can produce some ore

getCapacity

public int getCapacity()
Getter for capacity

Returns:
Returns capacity.

setCapacity

public void setCapacity(int capacity)
Setter for capacity.

Parameters:
capacity - The Target.java value to set

getInitialcapacity

public int getInitialcapacity()
Getter for initialcapacity

Returns:
Returns initialcapacity.

setInitialcapacity

public void setInitialcapacity(int initialcapacity)
Setter for initialcapacity.

Parameters:
initialcapacity - The Target.java value to set

setMarked

public void setMarked(boolean marked)
Setter for marked.

Parameters:
marked - The Target.java value to set

setOre

public void setOre(int ore)
Setter for ore.

Parameters:
ore - The Target.java value to set

toString

public String toString()
Convert the Location to a string representation.

Overrides:
toString in class TargetData
Returns:
The string representation.

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.