crowdmodel.utils
Class Bcomparator

java.lang.Object
  extended by crowdmodel.utils.Bcomparator
All Implemented Interfaces:
java.util.Comparator<BehaviourRule>

public class Bcomparator
extends java.lang.Object
implements java.util.Comparator<BehaviourRule>

Describes how to compare two self-defined objects: BehaviourRule. In general one cannot just compare two objects in Java unless they are primitives (and it is known how to compare them). By implementing the Comparator one specifies the objects that are under comparison and how it should be done.

Author:
Nanda Wijermans

Constructor Summary
Bcomparator()
          empty constructor
 
Method Summary
 int compare(BehaviourRule b0, BehaviourRule b1)
          Compares the activation value of two BehaviourRules to design a hierarchical ordering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

Bcomparator

public Bcomparator()
empty constructor

Method Detail

compare

public int compare(BehaviourRule b0,
                   BehaviourRule b1)
Compares the activation value of two BehaviourRules to design a hierarchical ordering

Specified by:
compare in interface java.util.Comparator<BehaviourRule>