public final class FieldUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FieldUtils.KeyValue
An implementation of a basic key value pair.
|
(package private) static class |
FieldUtils.KeyValueKeyComparator
Comparator to sort KeyValue by key.
|
(package private) static class |
FieldUtils.KeyValueValueComparator
Comparator to sort KeyValue by value.
|
Modifier | Constructor and Description |
---|---|
private |
FieldUtils()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) static java.util.List<java.lang.String> |
getPairableItems(COSBase items,
int pairIdx)
Return either one of a list which can have two-element arrays entries.
|
(package private) static void |
sortByKey(java.util.List<FieldUtils.KeyValue> pairs)
Sort two related lists simultaneously by the elements in the value parameter.
|
(package private) static void |
sortByValue(java.util.List<FieldUtils.KeyValue> pairs)
Sort two related lists simultaneously by the elements in the key parameter.
|
(package private) static java.util.List<FieldUtils.KeyValue> |
toKeyValueList(java.util.List<java.lang.String> key,
java.util.List<java.lang.String> value)
Return two related lists as a single list with key value pairs.
|
static java.util.List<FieldUtils.KeyValue> toKeyValueList(java.util.List<java.lang.String> key, java.util.List<java.lang.String> value)
key
- the key elementsvalue
- the value elementsstatic void sortByValue(java.util.List<FieldUtils.KeyValue> pairs)
pairs
- a list of KeyValue elementsstatic void sortByKey(java.util.List<FieldUtils.KeyValue> pairs)
pairs
- a list of KeyValue elementsstatic java.util.List<java.lang.String> getPairableItems(COSBase items, int pairIdx)
Some entries in a dictionary can either be an array of elements or an array of two-element arrays. This method will either return the elements in the array or in case of two-element arrays, the element designated by the pair index
An IllegalArgumentException
will be thrown if the items contain
two-element arrays and the index is not 0 or 1.
items
- the array of elements or two-element arrayspairIdx
- the index into the two-element array