public abstract static class IlvSDMObjectComparator.SortCriteria extends Object implements Comparator<Object>
SortCriteria
is the base class
for specifying a sort criteria. Sort criteria are intended for use with
the IlvSDMObjectComparator
only.
Note: you must use one of the following subclasses:
IlvSDMObjectComparator.DataModelAttributeSortCriteria
, IlvSDMObjectComparator.ComparatorSortCriteria
or IlvSDMObjectComparator.ModelOrderSortCriteria
.
You should not create a new direct subclass of this abstract class.
Subclassing this abstract class is not supported. This is to keep the text description of the sort criteria as simple as possible.
Constructor and Description |
---|
SortCriteria()
Creates a new
SortCriteria instance. |
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(Object obj1,
Object obj2)
Compares two objects according to their sort criteria.
|
static IlvSDMObjectComparator.SortCriteria |
createFromTextualDescription(String description)
Returns a new instance of a sort criteria from the provided
text description.
|
abstract String |
getTextualDescription()
Returns the text description of the sort criteria.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public abstract int compare(Object obj1, Object obj2)
compare
in interface Comparator<Object>
obj1
- One object.obj2
- Another object.java.util.Comparator
.public abstract String getTextualDescription()
IlvSDMObjectComparator.setTextualSortCriteria(java.lang.String)
.public static IlvSDMObjectComparator.SortCriteria createFromTextualDescription(String description)
description
- This parameter must match the format
defined by one of the sort criteria concrete classes. It must also be
consistent with the format used by getTextualDescription()
.description
is empty, null
is returned.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.