public int compare(DataType first, DataType second) {
                    if (first instanceof StructuredDataType && !(second instanceof StructuredDataType)) {
                        return 1;
                    } else if (!(first instanceof StructuredDataType) && second instanceof StructuredDataType) {
                        return -1;
                    } else {
                        return 0;
                    }
                }
For internal use only, avoid whenever possible.
Use constants and factories in DataType instead.
For structs, use getStructType() in DocumentType.
For annotation payloads, use getDataType() in AnnotationType.
document/src/main/java/com/yahoo/document/DocumentTypeManager.java