Package org.apache.solr.client.solrj.io.comp

## Class MultipleFieldComparator

- java.lang.Object
- - org.apache.solr.client.solrj.io.comp.MultipleFieldComparator

All Implemented Interfaces:
  `Serializable`, `Comparator<Tuple>`, `StreamComparator`, `Expressible`

    public class MultipleFieldComparator
    extends Object
    implements StreamComparator

Wraps multiple Comparators to provide sub-sorting.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`MultipleFieldComparator​(StreamComparator... comps)`

### Method Summary

All Methods Instance Methods Concrete Methods
`StreamComparator` `append​(StreamComparator other)`
`int` `compare​(Tuple t1, Tuple t2)`
`MultipleFieldComparator` `copyAliased​(Map<String,​String> aliases)`
`boolean` `equals​(Object o)`
`StreamComparator[]` `getComps()`
`int` `hashCode()`
`boolean` `isDerivedFrom​(StreamComparator base)`
`Explanation` `toExplanation​(StreamFactory factory)` Returns an explanation about the stream object
`StreamExpressionParameter` `toExpression​(StreamFactory factory)`

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

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

### Constructor Detail

#### MultipleFieldComparator

    public MultipleFieldComparator​(StreamComparator... comps)

### Method Detail

#### getComps

    public StreamComparator[] getComps()

#### compare

    public int compare​(Tuple t1,
                       Tuple t2)

Specified by:
  `compare` in interface `Comparator<Tuple>`

#### equals

    public boolean equals​(Object o)

Specified by:
  `equals` in interface `Comparator<Tuple>`
Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toExpression

    public StreamExpressionParameter toExpression​(StreamFactory factory)
                                           throws IOException

Specified by:
  `toExpression` in interface `Expressible`
Throws:
  `IOException`

#### isDerivedFrom

    public boolean isDerivedFrom​(StreamComparator base)

Specified by:
  `isDerivedFrom` in interface `StreamComparator`

#### toExplanation

    public Explanation toExplanation​(StreamFactory factory)
                              throws IOException

Description copied from interface: `Expressible`
Returns an explanation about the stream object

Specified by:
  `toExplanation` in interface `Expressible`
Parameters:
  `factory` - Stream factory for this, contains information about the function name
Returns:
  Explanation about this stream object containing explanations of any child stream objects
Throws:
  `IOException` - throw on any error

#### copyAliased

    public MultipleFieldComparator copyAliased​(Map<String,​String> aliases)

Specified by:
  `copyAliased` in interface `StreamComparator`

#### append

    public StreamComparator append​(StreamComparator other)

Specified by:
  `append` in interface `StreamComparator`