code: @Override
    public final int addDirectoryEntry(E entry) {
      // entry is not a directory entry
      if(entry instanceof LeafEntry) {
        throw new UnsupportedOperationException("Entry is not a directory entry!");
      }
      // this is a not a directory node
      if(isLeaf()) {
        throw new UnsupportedOperationException("Node is not a directory node!");
      }
  
      return addEntry(entry);
    }
docs: Adds a new directory entry to this node's children and returns the index of
  the entry in this node's children array. An UnsupportedOperationException
  will be thrown if the entry is not a directory entry or this node is not a
  directory node.
  
  @param entry the directory entry to be added
  @return the index of the entry in this node's children array
  @throws UnsupportedOperationException if entry is not a directory entry or
  this node is not a directory node