Package jadex.bdi.examples.hunterprey
Class CreatureActionComparator
- java.lang.Object
-
- jadex.bdi.examples.hunterprey.CreatureActionComparator
-
- All Implemented Interfaces:
java.util.Comparator
public class CreatureActionComparator extends java.lang.Object implements java.util.Comparator
Sort creature actions to execute hunters before preys.
-
-
Field Summary
Fields Modifier and Type Field Description protected IEnvironmentSpace
space
The space.
-
Constructor Summary
Constructors Constructor Description CreatureActionComparator(IEnvironmentSpace space)
Create a new creature action comparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object obj1, java.lang.Object obj2)
Return a negative number when the first action should be executed before the second.
-
-
-
Field Detail
-
space
protected IEnvironmentSpace space
The space.
-
-
Constructor Detail
-
CreatureActionComparator
public CreatureActionComparator(IEnvironmentSpace space)
Create a new creature action comparator.
-
-