// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __org_apache_lucene_search_spans_NearSpans__
#define __org_apache_lucene_search_spans_NearSpans__

#pragma interface

#include <java/lang/Object.h>

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace index
        {
          class IndexReader;
        }
        namespace search
        {
          namespace spans
          {
            class NearSpans;
            class NearSpans$CellQueue;
            class NearSpans$SpansCell;
            class SpanNearQuery;
          }
        }
      }
    }
  }
}

class org::apache::lucene::search::spans::NearSpans : public ::java::lang::Object
{
public:
  NearSpans (::org::apache::lucene::search::spans::SpanNearQuery *, ::org::apache::lucene::index::IndexReader *);
  virtual jboolean next ();
  virtual jboolean skipTo (jint);
private:
  ::org::apache::lucene::search::spans::NearSpans$SpansCell *min ();
public:
  virtual jint doc ();
  virtual jint start ();
  virtual jint end ();
  virtual ::java::lang::String *toString ();
private:
  void initList (jboolean);
  void addToList (::org::apache::lucene::search::spans::NearSpans$SpansCell *);
  void firstToLast ();
  void queueToList ();
  jboolean firstNonOrderedNextToPartialList ();
  void listToQueue ();
  void partialListToQueue ();
  jboolean atMatch ();
  jboolean checkSlop ();
  jboolean matchIsOrdered ();
  ::org::apache::lucene::search::spans::SpanNearQuery * __attribute__((aligned(__alignof__( ::java::lang::Object )))) query;
  ::java::util::List *ordered;
  jint slop;
  jboolean inOrder;
  ::org::apache::lucene::search::spans::NearSpans$SpansCell *first;
  ::org::apache::lucene::search::spans::NearSpans$SpansCell *last;
  jint totalLength;
  ::org::apache::lucene::search::spans::NearSpans$CellQueue *queue;
  ::org::apache::lucene::search::spans::NearSpans$SpansCell *max;
  jboolean more;
  jboolean firstTime;

  friend class org_apache_lucene_search_spans_NearSpans$SpansCell;
  friend class org_apache_lucene_search_spans_NearSpans$CellQueue;
public:

  static ::java::lang::Class class$;
};

#endif /* __org_apache_lucene_search_spans_NearSpans__ */
