Class Vision
- java.lang.Object
-
- jadex.bdi.examples.hunterprey_classic.Vision
-
public class Vision extends java.lang.Object
Editable Java class for concept Vision of hunterprey ontology.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List
objects
The visible objects with locations relative to the creature.
-
Constructor Summary
Constructors Constructor Description Vision()
Create a new Vision.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObject(WorldObject object)
Add a object to this Vision.boolean
contains(WorldObject object)
Test if an object is currently seen.Creature[]
getCreatures()
Get the creatures in the vision.WorldObject
getObject(int idx)
Get an objects of this Vision.WorldObject[]
getObjects()
Get the objects of this Vision.boolean
removeObject(WorldObject object)
Remove a object from this Vision.void
setObject(int idx, WorldObject object)
Set a object to this Vision.void
setObjects(WorldObject[] objects)
Set the objects of this Vision.java.lang.String
toString()
Get a string representation of this Vision.
-
-
-
Method Detail
-
getObjects
public WorldObject[] getObjects()
Get the objects of this Vision. The visible objects with locations relative to the creature.- Returns:
- objects
-
setObjects
public void setObjects(WorldObject[] objects)
Set the objects of this Vision. The visible objects with locations relative to the creature.- Parameters:
objects
- the value to be set
-
getObject
public WorldObject getObject(int idx)
Get an objects of this Vision. The visible objects with locations relative to the creature.- Parameters:
idx
- The index.- Returns:
- objects
-
setObject
public void setObject(int idx, WorldObject object)
Set a object to this Vision. The visible objects with locations relative to the creature.- Parameters:
idx
- The index.object
- a value to be added
-
addObject
public void addObject(WorldObject object)
Add a object to this Vision. The visible objects with locations relative to the creature.- Parameters:
object
- a value to be removed
-
removeObject
public boolean removeObject(WorldObject object)
Remove a object from this Vision. The visible objects with locations relative to the creature.- Parameters:
object
- a value to be removed- Returns:
- True when the objects have changed.
-
getCreatures
public Creature[] getCreatures()
Get the creatures in the vision.
-
contains
public boolean contains(WorldObject object)
Test if an object is currently seen.- Returns:
- True, if seen.
-
toString
public java.lang.String toString()
Get a string representation of this Vision.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-