Package com.priint.pubserver.util
Class ValueUtils.ValueItemComparator
- java.lang.Object
-
- com.priint.pubserver.util.ValueUtils.ValueItemComparator
-
- All Implemented Interfaces:
java.util.Comparator<ValueItem>
- Enclosing class:
- ValueUtils
public static class ValueUtils.ValueItemComparator extends java.lang.Object implements java.util.Comparator<ValueItem>
-
-
Constructor Summary
Constructors Constructor Description ValueItemComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ValueItem o1, ValueItem o2)This method compares the labels of the Values.
-
-
-
Method Detail
-
compare
public int compare(ValueItem o1, ValueItem o2)
This method compares the labels of the Values.- Specified by:
comparein interfacejava.util.Comparator<ValueItem>- Parameters:
o1- first value item to be comparedo2- second value item to be compared- Returns:
- if o1 or o1.label equals null, returns -1. If o2 or o2 label equals null, returns 1. If o1 & o2 or o1.label&o2.label equals null, returns 0; Otherwise: returns 0 if both labels are equal; a value less than 0 if this o1.label is lexicographically less than the o2.label; and a value greater than 0 if o1.label is lexicographically greater than o2.label.
-
-