@Override
    public byte apply(byte val) {
      return (byte) (val ^ MASK);
    }
A {@code byte} value is inverted by taking its 1's Complement, achieved via {@code xor} with
{@code 0xff}.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Order.java