/** * Checks if this doc flavor object is equal to the given object. * * <p>Two doc flavor objects are considered equal if the provided object is not <code>null</code> * and an instance of <code>DocFlavor</code>. The MIME types has to be equal in their media type, * media subtype, their paramter/value combinations and the representation classname. * * @param obj the object to test. * @return <code>true</code> if equal, <code>false</code> otherwise. */ public boolean equals(Object obj) { if (!(obj instanceof DocFlavor)) return false; DocFlavor tmp = (DocFlavor) obj; return (getMimeType().equals(tmp.getMimeType()) && getRepresentationClassName().equals(tmp.getRepresentationClassName())); }