| 162 | } |
| 163 | |
| 164 | @Override |
| 165 | public int compareTo(final KeyValue other) { |
| 166 | int d; |
| 167 | if ((d = Bytes.memcmp(key, other.key)) != 0) { |
| 168 | return d; |
| 169 | } else if ((d = Bytes.memcmp(family, other.family)) != 0) { |
| 170 | return d; |
| 171 | } else if ((d = Bytes.memcmp(qualifier, other.qualifier)) != 0) { |
| 172 | return d; |
| 173 | //} else if ((d = Bytes.memcmp(value, other.value)) != 0) { |
| 174 | // return d; |
| 175 | } else if ((d = Long.signum(timestamp - other.timestamp)) != 0) { |
| 176 | return d; |
| 177 | } else { |
| 178 | // d = type - other.type; |
| 179 | d = Bytes.memcmp(value, other.value); |
| 180 | } |
| 181 | return d; |
| 182 | } |
| 183 | |
| 184 | public boolean equals(final Object other) { |
| 185 | if (other == null || !(other instanceof KeyValue)) { |