int high = rules.size() - 1;
while( low <= high ) {
i = (low + high) / 2;
ColorRule crule = (ColorRule) rules.elementAt(i);
int c = crule.compare(cat);
// System.out.println("C="+c+", I="+i+", cat="+cat+",
// CRULE="+crule);
if (c == 0) {
/*
* Attribute found with equal value so break and insert using this index.