de.uni_paderborn.robots.robot.group10
Class Map.DijDistanceComparator

java.lang.Object
  |
  +--de.uni_paderborn.robots.robot.group10.Map.DijDistanceComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
Map

protected class Map.DijDistanceComparator
extends java.lang.Object
implements java.util.Comparator

Implements an order for MapItems based on their BfsDistance. Used by Map.performDij()


Constructor Summary
protected Map.DijDistanceComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares the two objects which must be MapItems
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

Map.DijDistanceComparator

protected Map.DijDistanceComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares the two objects which must be MapItems
Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - a reference to the fist MapItem
o2 - a reference to the second MapItem
Returns:
a value < 0 if o1 < o2, 0 if o1 = o2 or a value > 0 if o1 > o2