Class KeyValueUtils
- java.lang.Object
-
- com.priint.pubserver.plugin.entitydata.utils.KeyValueUtils
-
public class KeyValueUtils extends java.lang.ObjectHelper methods for intersecting or joining lists of KeyValue.- Since:
- 4.1.0
-
-
Constructor Summary
Constructors Constructor Description KeyValueUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<KeyValue>getIntersectionOfKeyValueList(java.util.List<java.util.List<KeyValue>> listOfKeyValuesList, java.util.List<java.lang.String> compareCriteria)The parameter list of KeyValue lists is passed.java.util.List<KeyValue>getUnionOfKeyValueList(java.util.List<java.util.List<KeyValue>> listOfKeyValuesList, java.util.List<java.lang.String> compareCriteria)The parameter list of KeyValue lists is passed.
-
-
-
Method Detail
-
getIntersectionOfKeyValueList
public java.util.List<KeyValue> getIntersectionOfKeyValueList(java.util.List<java.util.List<KeyValue>> listOfKeyValuesList, java.util.List<java.lang.String> compareCriteria) throws PubServerException
The parameter list of KeyValue lists is passed. Common Key Value pairs are summarized in a results list. A parameter can be used to control which data items are checked for equality. KV's only come back when the key (or keylabel) was found in every listOflist.
So we have to look only for keys (or keylabels) of the first KV-list.- Parameters:
listOfKeyValuesList- The list of key value lists to analyze for equality.compareCriteria- List of elements those who will be checked for equality.- Returns:
- intersection of KV's matching the compareCriteria.
- Throws:
PubServerException- Since:
- 4.1.0
-
getUnionOfKeyValueList
public java.util.List<KeyValue> getUnionOfKeyValueList(java.util.List<java.util.List<KeyValue>> listOfKeyValuesList, java.util.List<java.lang.String> compareCriteria) throws PubServerException
The parameter list of KeyValue lists is passed. There is formed a union. It can be passed as parameters, according to which criteria the union be formed. KV's come back when the key (or keylabel) was found in one of the listOfLists.
By forming the union will be no "duplicates".- Parameters:
listOfKeyValuesList- The list of key value lists to analyze for union.compareCriteria- List of elements those who will be checked for unionable.- Returns:
- union of KV's matching the compareCriteria.
- Throws:
PubServerException- Since:
- 4.1.0
-
-