org.apache.jackrabbit.core.query.lucene.join
Class ValueComparator

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.join.ValueComparator
All Implemented Interfaces:
Comparator<Value>

public class ValueComparator
extends Object
implements Comparator<Value>

Comparator for Value instances.


Constructor Summary
ValueComparator()
           
 
Method Summary
 int compare(Value a, Value b)
          Compares two values.
 boolean evaluate(String operator, Value[] a, Value[] b)
          Evaluates the given QOM comparison operation with the given value arrays.
 boolean evaluate(String operator, Value a, Value b)
          Evaluates the given QOM comparison operation with the given values.
 
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
equals
 

Constructor Detail

ValueComparator

public ValueComparator()
Method Detail

compare

public int compare(Value a,
                   Value b)
Compares two values.

Specified by:
compare in interface Comparator<Value>

evaluate

public boolean evaluate(String operator,
                        Value a,
                        Value b)
Evaluates the given QOM comparison operation with the given values.

Parameters:
operator - QOM comparison operator
a - left value
b - right value
Returns:
result of the comparison

evaluate

public boolean evaluate(String operator,
                        Value[] a,
                        Value[] b)
Evaluates the given QOM comparison operation with the given value arrays.

Parameters:
operator - QOM comparison operator
a - left values
b - right values
Returns:
result of the comparison


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.