public boolean matchesSafely(Iterable<MarkdownToken> item) {
Iterator<MarkdownToken> iterator = item.iterator();
boolean result = true;
int index;
for (index = 0; index < lengths.length && iterator.hasNext() && result; ++index) {
MarkdownToken token = iterator.next();
if (token.getLength() != lengths[index]) {
return false;
}
}
if (index < lengths.length || iterator.hasNext()) {
return false;