/** * determine if this match or any submatches has the description * * @param desc DOCUMENT ME! * * @return whether or not the description matches */ public boolean mimeTypeMatches(String desc) { if ((mimeType != null) && mimeType.equals(desc)) { return true; } Collection submatches = getSubMatches(); Iterator i = submatches.iterator(); MagicMatch m = null; while (i.hasNext()) { m = (MagicMatch) i.next(); if (m.mimeTypeMatches(desc)) { return true; } } return false; }
/** * determine if this match or any submatches has the description * * @param desc DOCUMENT ME! * * @return whether or not the description matches */ public boolean mimeTypeMatches(String desc) { if ((mimeType != null) && mimeType.equals(desc)) { return true; } Collection<MagicMatch> submatches = getSubMatches(); Iterator<MagicMatch> i = submatches.iterator(); MagicMatch m = null; while (i.hasNext()) { m = (MagicMatch) i.next(); if (m.mimeTypeMatches(desc)) { return true; } } return false; }
/** * determine if this match or any submatches has the description * * @param desc DOCUMENT ME! * * @return whether or not the description matches */ public boolean mimeTypeMatches(final String desc) { if (this.mimeType != null && this.mimeType.equals(desc)) { return true; } final Collection<MagicMatch> submatches = getSubMatches(); final Iterator<MagicMatch> i = submatches.iterator(); MagicMatch m = null; while (i.hasNext()) { m = i.next(); if (m.mimeTypeMatches(desc)) { return true; } } return false; }