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 Description MultipleFieldComparator(StreamComparator... comps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 objectStreamExpressionParameter
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 interfaceComparator<Tuple>
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceComparator<Tuple>
- Overrides:
equals
in classObject
-
toExpression
public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException
- Specified by:
toExpression
in interfaceExpressible
- Throws:
IOException
-
isDerivedFrom
public boolean isDerivedFrom(StreamComparator base)
- Specified by:
isDerivedFrom
in interfaceStreamComparator
-
toExplanation
public Explanation toExplanation(StreamFactory factory) throws IOException
Description copied from interface:Expressible
Returns an explanation about the stream object- Specified by:
toExplanation
in interfaceExpressible
- 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 interfaceStreamComparator
-
append
public StreamComparator append(StreamComparator other)
- Specified by:
append
in interfaceStreamComparator
-
-