@Status(stage=PRODUCTION, unitTests=COMPLETE) @Review(by="Kees Schotanus",at="2009-09-28") @Review(by="Kees Schotanus",at="2009-10-14",reason="After completing unit tests") public class CompareField extends Object
MultiFieldComparator
Modifier and Type | Field and Description |
---|---|
static CompareField[] |
EMPTY_ARRAY_OF_COMPARE_FIELDS
Empty array of Fields.
|
Constructor and Description |
---|
CompareField(CompareField compareField)
Copy constructor.
|
CompareField(Method... methods)
Creates this CompareField that will be orderer ascending.
|
CompareField(Method method,
Order order)
Creates this CompareField that will be ordered according to the supplied order.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Determines whether this CompareField is equal to the supplied object.
|
Method[] |
getMethods()
Gets a copy of the methods that get the value of this field.
|
Order |
getOrdering()
Gets the order of this CompareField.
|
int |
hashCode()
Computes the hash code of this CompareField.
|
void |
setOrdering(Order order)
Sets the order for this CompareField.
|
void |
toggleOrdering()
Toggles the order (ascending/descending) for this CompareField.
|
String |
toString()
Creates a String representation of this CompareField.
|
public static final CompareField[] EMPTY_ARRAY_OF_COMPARE_FIELDS
public CompareField(CompareField compareField)
compareField
- The CompareField to copy information from.NullPointerException
- When the supplied compareField is null.public CompareField(Method... methods)
methods
- The methods that get the value of this field.NullPointerException
- When the supplied methods is null.public CompareField(Method method, Order order)
method
- The method that gets the value of this field.order
- The order for this CompareField.NullPointerException
- When either the supplied method or order is null.public Method[] getMethods()
public Order getOrdering()
public void setOrdering(Order order)
order
- The order for this CompareField.NullPointerException
- When the supplied order is null.public void toggleOrdering()
public boolean equals(Object object)
public int hashCode()
Copyright © 2008–2018. All rights reserved.