public static TimeRange toTimeRange(HBaseProtos.TimeRange timeRange) {
    if (timeRange == null) {
      return TimeRange.allTime();
    }
    if (timeRange.hasFrom()) {
      if (timeRange.hasTo()) {
        return TimeRange.between(timeRange.getFrom(), timeRange.getTo());
      } else {
        return TimeRange.from(timeRange.getFrom());
      }
    } else {
      return TimeRange.until(timeRange.getTo());
    }
  }
Convert SecurityCapabilitiesResponse.Capability to SecurityCapability
@param capabilities capabilities returned in the SecurityCapabilitiesResponse message
@return the converted list of SecurityCapability elements
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java