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

#ifndef __org_apache_lucene_search_spans_NearSpansOrdered__
#define __org_apache_lucene_search_spans_NearSpansOrdered__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace org
  {
    namespace apache
    {
      namespace lucene
      {
        namespace index
        {
          class IndexReader;
        }
        namespace search
        {
          namespace spans
          {
            class NearSpansOrdered;
            class SpanNearQuery;
            class Spans;
          }
        }
      }
    }
  }
}

class org::apache::lucene::search::spans::NearSpansOrdered : public ::java::lang::Object
{
public:
  NearSpansOrdered (::org::apache::lucene::search::spans::SpanNearQuery *, ::org::apache::lucene::index::IndexReader *);
  virtual jint doc () { return matchDoc; }
  virtual jint start () { return matchStart; }
  virtual jint end () { return matchEnd; }
  virtual jboolean next ();
  virtual jboolean skipTo (jint);
private:
  jboolean advanceAfterOrdered ();
  jboolean toSameDoc ();
public: // actually package-private
  static jboolean docSpansOrdered (::org::apache::lucene::search::spans::Spans *, ::org::apache::lucene::search::spans::Spans *);
private:
  static jboolean docSpansOrdered (jint, jint, jint, jint);
  jboolean stretchToOrder ();
  jboolean shrinkToAfterShortestMatch ();
public:
  virtual ::java::lang::String *toString ();
private:
  jint __attribute__((aligned(__alignof__( ::java::lang::Object ))))  allowedSlop;
  jboolean firstTime;
  jboolean more;
  JArray< ::org::apache::lucene::search::spans::Spans *> *subSpans;
  jboolean inSameDoc;
  jint matchDoc;
  jint matchStart;
  jint matchEnd;
  JArray< ::org::apache::lucene::search::spans::Spans *> *subSpansByDoc;
  ::java::util::Comparator *spanDocComparator;
  ::org::apache::lucene::search::spans::SpanNearQuery *query;
public: // actually package-private
  static jboolean $assertionsDisabled;
  static ::java::lang::Class *class$org$apache$lucene$search$spans$NearSpansOrdered;

  friend class org_apache_lucene_search_spans_NearSpansOrdered$1;
public:

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

#endif /* __org_apache_lucene_search_spans_NearSpansOrdered__ */
