@Override
    public final boolean hasNext() {

        resetToLastKey();

        // a predicate has to evaluate to true only once.
        if (mIsFirst) {
            mIsFirst = false;

            if (mPredicate.hasNext()) {

                if (isBooleanFalse()) {
                    resetToStartKey();
                    return false;
                }

                // reset is needed, because a predicate works more like a
                // filter. It
                // does
                // not change the current transaction.
                resetToLastKey();
                return true;
            }

        }

        resetToStartKey();
        return false;

    }
@ Override public final boolean hasNext ( ) { resetToLastKey ( ) ; if ( mIsFirst ) { mIsFirst = false ; if ( mPredicate . hasNext ( ) ) { if ( isBooleanFalse ( ) ) { resetToStartKey ( ) ; return false ; } resetToLastKey ( ) ; return true ; } } resetToStartKey ( ) ; return false ; }
{@inheritDoc}