Package parser.methods.ext
Class Utils
java.lang.Object
parser.methods.ext.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getFirstTokenAsInt
(List<String> tokens) static BigDecimal
gsum
(List<BigDecimal> l) static List<BigDecimal>
stringsToBigDecimals
(List<String> tokens) Converts list of strings to list of big decimalsstatic List<BigDecimal>
stringsToBigDecimals
(List<String> tokens, int headCut) Converts list of strings to list of big decimals, and custs firststatic BigDecimal
sum
(List<BigDecimal> l) static List<?>
Will remove toRemove elements from BOTH sides of tokens, leaving at least minLength of elements in place.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
stringsToBigDecimals
Converts list of strings to list of big decimals -
stringsToBigDecimals
Converts list of strings to list of big decimals, and custs first- Parameters:
headCut
- members to cut of frombthebegining
-
trimList
Will remove toRemove elements from BOTH sides of tokens, leaving at least minLength of elements in place. It always take from both sides, or nto at all -
sum
- Returns:
- the sum of all elements in the data set with BigDecimal precission
-
gsum
- Returns:
- the geomethrical (multiplied) sum of all elements in the data set
-
getFirstTokenAsInt
-