public class MultiColCompare extends Object implements CompareInterface
| Modifier and Type | Field and Description |
|---|---|
(package private) int[] |
comparePosArray
Array with column numbers to compare
|
| Constructor and Description |
|---|
MultiColCompare(int[] posArray)
Creates a MultiColCompare.
|
MultiColCompare(String posList)
Constructor for comparing using multiple columns, where column position order is significant.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object thisOne,
Object other)
Make the comparison between to Vectors over all colums specified in the
postiton array.
|
int |
compareCol(Object thisOne,
Object other,
int comparePosIndex)
Make the comparison between to Vectors over all columns specified in the
postiton array, starting from a specified index in that array.
|
(package private) int |
internalIntCompare(Object thisOne,
Object other)
Make the comparison between two Integer objects.
|
(package private) int |
internalStringCompare(Object thisOne,
Object other)
Make the comparison between two String objects.
|
public MultiColCompare(int[] posArray)
posArray - a list of column numberspublic MultiColCompare(String posList)
posList - - a String with colpositions syntax "x:y:..." eg. "6:4".public int compareCol(Object thisOne, Object other, int comparePosIndex)
thisOne - the first object to compare. should be a Vector.other - the second object to compare. should be a Vector.comparePosIndex - the index in the positionarray where to start comparingpublic int compare(Object thisOne, Object other)
compare in interface CompareInterfacethisOne - the first object to compare. should be a Vector.other - the second object to compare. should be a Vector.int internalIntCompare(Object thisOne, Object other)
thisOne - the first object to compare. should be a Integer.other - the second object to compare. should be a Integer.int internalStringCompare(Object thisOne, Object other)
thisOne - the first object to compare. should be a String.other - the second object to compare. should be a String.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}