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
Constructor and Description
`MultipleFieldComparator(StreamComparator... comps)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compare(Tuple t1, Tuple t2)`
`MultipleFieldComparator` `copyAliased(Map<String,String> aliases)`
`StreamComparator[]` `getComps()`
`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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

`comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, 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>`

#### 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`