code: public int compareTo(CandidateField o) {
  		if (o == null) {
  			return 1;
  		}
  		
  		int myWeight = this.weight == null ? 0 : this.weight.toInteger();
  		int otherWeight = o.getWeight() == null ? 0 : o.getWeight().toInteger();
  		
  		if(myWeight > otherWeight) {
  			return 1;
  		}
  		if(myWeight < otherWeight) {
  			return -1;
  		}
  		return 0;
  	}
docs: Compares two {@link CandidateField} by weight.