public class ColorCountComparator extends Object implements Comparator<org.apache.commons.imaging.palette.ColorCount>, Serializable
It uses a given {#link ColorComponent} to choose what channel must be used for the comparison.
For example, if the comparator is created for the
ColorComponent.RED channel, then it will
compare the value of red of each ColorCount
object in the array of elements.
| Constructor and Description |
|---|
ColorCountComparator(org.apache.commons.imaging.palette.ColorComponent colorComponent) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(org.apache.commons.imaging.palette.ColorCount c1,
org.apache.commons.imaging.palette.ColorCount c2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ColorCountComparator(org.apache.commons.imaging.palette.ColorComponent colorComponent)
public int compare(org.apache.commons.imaging.palette.ColorCount c1,
org.apache.commons.imaging.palette.ColorCount c2)
compare in interface Comparator<org.apache.commons.imaging.palette.ColorCount>Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.