public class IlvColumnValueComparatorFactory extends Object implements IlvComparatorFactory, Serializable
IlvColumnValueComparator
,
Serialized FormConstructor and Description |
---|
IlvColumnValueComparatorFactory(IlvDataColumnInfo column,
Comparator comparator,
boolean inverted)
Creates a comparator that uses a given column to compare objects of a
model.
|
IlvColumnValueComparatorFactory(int columnIndex,
Comparator comparator,
boolean inverted)
Creates a comparator that uses a given column to compare objects of a
given model.
|
Modifier and Type | Method and Description |
---|---|
Comparator |
createComparator(IlvObjectModelWithColumns model)
Returns a comparator for the objects of the given model.
|
boolean |
equals(Object other)
Compares this object to another object.
|
IlvDataColumnInfo |
getColumn()
Returns the column whose values are used for comparison, or
null if it was not specified to the constructor. |
int |
getColumnIndex()
Returns the index of the column whose values are used for comparison, or
-1 if it was not specified to the constructor. |
Comparator |
getComparator()
Returns the Comparator for comparing the column values, or
null denoting a default comparator. |
int |
hashCode()
Returns a hash code that is compatible with
equals() . |
boolean |
isInverted()
Returns
true if the comparison is inverted. |
public IlvColumnValueComparatorFactory(IlvDataColumnInfo column, Comparator comparator, boolean inverted)
column
- The column of the model whose values are used for comparison.comparator
- A Comparator for comparing the column values, or
null
denoting a default comparator.inverted
- true
if the comparison is inverted.public IlvColumnValueComparatorFactory(int columnIndex, Comparator comparator, boolean inverted)
columnIndex
- The index of the column of the model whose values are
used for comparison.comparator
- A Comparator for comparing the column values, or
null
denoting a default comparator.inverted
- true
if the comparison is inverted.public Comparator createComparator(IlvObjectModelWithColumns model)
createComparator
in interface IlvComparatorFactory
model
- The model whose elements are being sorted.public boolean equals(Object other)
equals
in interface IlvComparatorFactory
equals
in class Object
public int hashCode()
equals()
.hashCode
in interface IlvComparatorFactory
hashCode
in class Object
public IlvDataColumnInfo getColumn()
null
if it was not specified to the constructor.public int getColumnIndex()
-1
if it was not specified to the constructor.public Comparator getComparator()
null
denoting a default comparator.public boolean isInverted()
true
if the comparison is inverted.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.