docs: @SuppressWarnings("unchecked")
    public final void integrityCheck(AbstractRStarTree<N, E, ?> tree) {
      // leaf node
      if(isLeaf()) {
        for(int i = 0; i < getCapacity(); i++) {
          E e = getEntry(i);
          if(i < getNumEntries() && e == null) {
            throw new RuntimeException("i < numEntries && entry == null");
          }
          if(i >= getNumEntries() && e != null) {
            throw new RuntimeException("i >= numEntries && entry != null");
          }
        }
      }
  
      // dir node
      else {
        N tmp = tree.getNode(getEntry(0));
        boolean childIsLeaf = tmp.isLeaf();
  
        for(int i = 0; i < getCapacity(); i++) {
          E e = getEntry(i);
  
          if(i < getNumEntries() && e == null) {
            throw new RuntimeException("i < numEntries && entry == null");
          }
  
          if(i >= getNumEntries() && e != null) {
            throw new RuntimeException("i >= numEntries && entry != null");
          }
  
          if(e != null) {
            N node = tree.getNode(e);
  
            if(childIsLeaf && !node.isLeaf()) {
              for(int k = 0; k < getNumEntries(); k++) {
                tree.getNode(getEntry(k));
              }
  
              throw new RuntimeException("Wrong Child in " + this + " at " + i);
            }
  
            if(!childIsLeaf && node.isLeaf()) {
              throw new RuntimeException("Wrong Child: child id no leaf, but node is leaf!");
            }
  
            node.integrityCheckParameters((N) this, i);
            node.integrityCheck(tree);
          }
        }
  
        if(LoggingConfiguration.DEBUG) {
          Logger.getLogger(this.getClass().getName()).fine("DirNode " + getPageID() + " ok!");
        }
      }
    }