code: public int compareTo(HealthState o) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "compareTo", new Object[] {this, o});
      
      int equal = 0;
      
      // A greater state value means a healthier state, so a 
      if (state > ((HealthStateTree)o).state)
        equal = 1; // This is the healthier state
      else if (((HealthStateTree)o).state > state)
        equal = -1; // o is the healthier state
      // If the states are the same (e.g. both AMBER), then we need to work out which is the
      // worse reason for being in this state
      else
      {
        // If the reason's match, return zero
        if(reason.intValue() == ((HealthStateTree)o).reason.intValue())
          equal = 0;
        // The this reason has a greater value that o's reason, this state is worse than o's
        else if(HealthStateListener.orderedReasons[state][reason] >
                HealthStateListener.orderedReasons[state][((HealthStateTree)o).reason])
          equal = -1;
        // Otherwise, o's reason is worse than us
        else
          equal = 1;
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "compareTo", equal);
      return equal;
    }
docs: greater than zero : This state is healthier than state o
  less than zero    : This state is worse than state o
  zero              : This state is comparable to o
  
  @param o
  @return