public StarTreeIndexNode getMatchingNode(StarTreeIndexNode node, List<Integer> dimensions) {
   if (node == null || node.isLeaf()) {
     return node;
   }
   Integer childDimensionName = node.getChildDimensionName();
   Integer childDimensionValue = dimensions.get(childDimensionName);
   StarTreeIndexNode child = node.getChildren().get(childDimensionValue);
   return getMatchingNode(child, dimensions);
 }
 @Override
 public boolean equals(Object o) {
   if (!(o instanceof StarTreeIndexNode)) {
     return false;
   }
   StarTreeIndexNode n = (StarTreeIndexNode) o;
   return Objects.equal(nodeId, n.getNodeId())
       && Objects.equal(level, n.getLevel())
       && Objects.equal(dimensionName, n.getDimensionName())
       && Objects.equal(dimensionValue, n.getDimensionValue())
       && Objects.equal(childDimensionName, n.getChildDimensionName())
       && Objects.equal(children, n.getChildren())
       && Objects.equal(startDocumentId, n.getStartDocumentId())
       && Objects.equal(documentCount, n.getDocumentCount());
 }