class MetadataIndexNode {

  int binarySearchInChildren(String key) {
    int low = 0;
    int high = children.size() - 1;

    while (low <= high) {
      int mid = (low + high) >>> 1;
      MetadataIndexEntry midVal = children.get(mid);
      int cmp = midVal.getName().compareTo(key);

      if (cmp < 0) {
        low = mid + 1;
      } else if (cmp > 0) {
        high = mid - 1;
      } else {
        return mid; // key found
      }
    }
    return low == 0 ? low : low - 1;  // key not found
  }

  public  MetadataIndexNode(MetadataIndexNodeType nodeType);
  public  MetadataIndexNode(List<MetadataIndexEntry> children, long endOffset,
      MetadataIndexNodeType nodeType);

}