Class RGBColorComparator
java.lang.Object
net.sourceforge.jiu.color.quantization.RGBColorComparator
- All Implemented Interfaces:
RGBIndex,ComparatorInterface
Compares two
RGBColor objects.- Author:
- Marco Schmidt
-
Field Summary
FieldsFields inherited from interface net.sourceforge.jiu.data.RGBIndex
INDEX_BLUE, INDEX_GREEN, INDEX_RED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares the two argument objects and returns their relation.voidsetSortOrder(int aSortOrder) Sets the internal sort order (it is sorted by one of the three RGB components) to the parameter.
-
Field Details
-
sortOrder
private int sortOrder
-
-
Constructor Details
-
RGBColorComparator
public RGBColorComparator(int aSortOrder)
-
-
Method Details
-
compare
Description copied from interface:ComparatorInterfaceCompares the two argument objects and returns their relation. Returns- a value < 0 if
o1is smaller thano2, - 0 if
o1is equal too2and - a value > 0 if
o1is greater thano2.
- Specified by:
comparein interfaceComparatorInterface
- a value < 0 if
-
setSortOrder
public void setSortOrder(int aSortOrder) Sets the internal sort order (it is sorted by one of the three RGB components) to the parameter.
-