public boolean hasNext()
    {
        if (scanner == null)
        {
            return false;
        }
        else
        {
            if (fetchSize != null)
            {
                if (counter < fetchSize)
                {
                    return resultsIter.hasNext();
                }
            }
            else
            {
                return resultsIter.hasNext();
            }
        }
        return false;
    }
public boolean hasNext ( ) { if ( scanner == null ) { return false ; } else { if ( fetchSize != null ) { if ( counter < fetchSize ) { return resultsIter . hasNext ( ) ; } } else { return resultsIter . hasNext ( ) ; } } return false ; }
Checks for next.

@return true, if successful