org.apache.lucene.queryparser.surround.query

## Class ComposedQuery

- java.lang.Object
- - org.apache.lucene.queryparser.surround.query.SrndQuery
  - - org.apache.lucene.queryparser.surround.query.ComposedQuery

All Implemented Interfaces:
  Cloneable

Direct Known Subclasses:
  AndQuery, DistanceQuery, NotQuery, OrQuery

    public abstract class ComposedQuery
    extends SrndQuery

Base class for composite queries (such as AND/OR/NOT)

### Field Summary

Fields
`protected String` `opName`
`protected List<SrndQuery>` `queries`

### Fields inherited from class org.apache.lucene.queryparser.surround.query.SrndQuery

`theEmptyLcnQuery`

### Constructor Summary

Constructors
Constructor and Description
`ComposedQuery(List<SrndQuery> qs, boolean operatorInfix, String opName)`

### Method Summary

Methods
`protected String` `getBracketClose()`
`protected String` `getBracketOpen()`
`int` `getNrSubQueries()`
`String` `getOperatorName()`
`protected String` `getPrefixSeparator()`
`Iterator<SrndQuery>` `getSubQueriesIterator()`
`SrndQuery` `getSubQuery(int qn)`
`protected void` `infixToString(StringBuilder r)`
`boolean` `isFieldsSubQueryAcceptable()`
`boolean` `isOperatorInfix()`
`List<Query>` `makeLuceneSubQueriesField(String fn, BasicQueryFactory qf)`
`protected void` `prefixToString(StringBuilder r)`
`protected void` `recompose(List<SrndQuery> queries)`
`String` `toString()` This method is used by `SrndQuery.hashCode()` and `SrndQuery.equals(Object)`, see LUCENE-2945.

### Methods inherited from class org.apache.lucene.queryparser.surround.query.SrndQuery

`clone, equals, getWeight, getWeightOperator, getWeightString, hashCode, isWeighted, makeLuceneQueryField, makeLuceneQueryFieldNoBoost, setWeight, weightToString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### opName

    protected String opName

#### queries

    protected List<SrndQuery> queries

### Constructor Detail

#### ComposedQuery

    public ComposedQuery(List<SrndQuery> qs,
                 boolean operatorInfix,
                 String opName)

### Method Detail

#### recompose

    protected void recompose(List<SrndQuery> queries)

#### getOperatorName

    public String getOperatorName()

#### getSubQueriesIterator

    public Iterator<SrndQuery> getSubQueriesIterator()

#### getNrSubQueries

    public int getNrSubQueries()

#### getSubQuery

    public SrndQuery getSubQuery(int qn)

#### isOperatorInfix

    public boolean isOperatorInfix()

#### makeLuceneSubQueriesField

    public List<Query> makeLuceneSubQueriesField(String fn,
                                        BasicQueryFactory qf)

#### toString

    public String toString()

Description copied from class: `SrndQuery`
This method is used by `SrndQuery.hashCode()` and `SrndQuery.equals(Object)`, see LUCENE-2945.

Specified by:
  `toString` in class `SrndQuery`

#### getPrefixSeparator

    protected String getPrefixSeparator()

#### getBracketOpen

    protected String getBracketOpen()

#### getBracketClose

    protected String getBracketClose()

#### infixToString

    protected void infixToString(StringBuilder r)

#### prefixToString

    protected void prefixToString(StringBuilder r)

#### isFieldsSubQueryAcceptable

    public boolean isFieldsSubQueryAcceptable()

Overrides:
  `isFieldsSubQueryAcceptable` in class `SrndQuery`