jadex.micro.examples.hunterprey
Class CreatureActionComparator
java.lang.Object
jadex.micro.examples.hunterprey.CreatureActionComparator
- All Implemented Interfaces:
- Comparator
public class CreatureActionComparator
- extends Object
- implements Comparator
Sort creature actions to execute hunters before preys.
|
Method Summary |
int |
compare(Object obj1,
Object obj2)
Return a negative number when the first action should be executed before the second. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
space
protected IEnvironmentSpace space
- The space.
CreatureActionComparator
public CreatureActionComparator(IEnvironmentSpace space)
- Create a new creature action comparator.
compare
public int compare(Object obj1,
Object obj2)
- Return a negative number when the first action should be executed before the second.
- Specified by:
compare in interface Comparator
Copyright © 2010. All Rights Reserved.