: But I think it should be the desired behavior for skipTo() to not skip
: at all
: if curDoc==target already? Which means we should clearify the javadocs.

i'm not certain about that ... in theory (given the way the
javadocs are currently written) shouldn't s.skipTo(0) always be
functionally equivilent to s.next() ?

I'm pbasingthis on the assumption that there must be some reason why the
"behaves as" clause was written as...

   *   boolean skipTo(int target) {
   *     do {
   *       if (!next())
   *         return false;
   *     } while (target > doc());
   *     return true;
   *   }

and not...

  boolean skipTo(int target) {
    while (target > doc()) {
      if (!next()) return false;
    }
    return true;
  }

...which is what you are describing.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to