Package com.illumon.iris.validation
Class ImportDetailsUtils
java.lang.Object
com.illumon.iris.validation.ImportDetailsUtils
Functionality for analyzing import details.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]getVals(String property, Properties... importDetails) Gets all the values for a given property.static doublesumDouble(String property, Properties... importDetails) Sum all of the values for a given property.static longsumLong(String property, Properties... importDetails) Sum all of the values for a given property.static LongsumOptionalLong(String property, Properties... importDetails) Sum all of the values for a given property.uniqueVals(String property, String splitRegex, Properties... importDetails) Gets the unique values for a given property.
-
Method Details
-
sumLong
Sum all of the values for a given property. The property is assumed to be a long type.- Parameters:
property- import details key for the property of interestimportDetails- import details- Returns:
- long sum of the property over all import details
-
sumOptionalLong
Sum all of the values for a given property. The property is assumed to be a long type. Return null if no properties are found with the specified name.- Parameters:
property- import details key for the property of interestimportDetails- import details- Returns:
- long sum of the property over all import details, or null if no properties are found with the specified name
-
sumDouble
Sum all of the values for a given property. The property is assumed to be a floating point type.- Parameters:
property- import details key for the property of interestimportDetails- import details- Returns:
- floating point sum of the property over all import details
-
getVals
Gets all the values for a given property. Missing values are indicated by null.- Parameters:
property- import details key for the property of interestimportDetails- import details- Returns:
- all the values for a given property. Missing values are indicated by null.
-
uniqueVals
public static Set<String> uniqueVals(String property, String splitRegex, Properties... importDetails) Gets the unique values for a given property.- Parameters:
property- import details key for the property of interestsplitRegex- regular expression to split the property values; null if the property should not be splitimportDetails- import details- Returns:
- set of unique values for the property
-