Package net.masterthought.cucumber.util
Class Util
java.lang.Object
net.masterthought.cucumber.util.Util
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioneliminateEmptyHooks(Hook[] hooks) Helper method that removes empty hooks from passed array and packs it into new collection.static StringformatAsDecimal(int value, int total) static StringformatAsPercentage(int value, int total) Returns value converted to percentage format.static StringformatDuration(long duration) static StringtoValidFileName(String fileName) Converts characters of passed string and replaces to hash which can be treated as valid file name.
-
Field Details
-
PERCENT_FORMATTER
-
INSTANCE
-
-
Method Details
-
formatDuration
-
formatAsPercentage
Returns value converted to percentage format.- Parameters:
value- value to converttotal- sum of all values- Returns:
- converted values including '%' character
-
formatAsDecimal
-
toValidFileName
Converts characters of passed string and replaces to hash which can be treated as valid file name.- Parameters:
fileName- sequence that should be converted- Returns:
- converted string
-
eliminateEmptyHooks
Helper method that removes empty hooks from passed array and packs it into new collection.- Parameters:
hooks- hooks to be reduced- Returns:
- no empty hooks
-