public boolean inherits(DocumentType superType) {
        if (equals(superType)) return true;
        for (DocumentType type : inherits) {
            if (type.inherits(superType)) return true;
        }
        return false;
    }
Return whether this document type inherits the given document type.

@param superType the documenttype to check if it inherits
@return true if it inherits the superType, false if not
document/src/main/java/com/yahoo/document/DocumentType.java