@Override
	public int compareTo (Result o) {
		if (value == null) {
			return o.value == null ? 0 : 1;
		}
		if (o.value == null) {
			return -1;
		}
		if (value.getClass() == o.value.getClass()) {
			if (value instanceof String) {
				return ((String) value).compareToIgnoreCase((String) o.value);
			}
			if (value instanceof Comparable) {
				return ((Comparable) value).compareTo((Comparable) o.value);
			}
		}
		return String.valueOf(value).compareTo(String.valueOf(o.value));
	}