public double get(Unit unit) {
    if (value == 0) {
      return value;
    }
    int diff = this.unit.getOrderOfSize() - unit.getOrderOfSize();
    if (diff == 0) {
      return value;
    }

    BigDecimal rval = BigDecimal.valueOf(value);
    for (int i = 0; i != Math.abs(diff); ++i) {
      rval = diff > 0 ? rval.multiply(SCALE_BASE) : rval.divide(SCALE_BASE);
    }
    return rval.doubleValue();
  }
get the value which is converted to specified unit.
@param unit size unit
@return the converted value
hbase-client/src/main/java/org/apache/hadoop/hbase/Size.java