From 9812ed30bd15324d2a337c8d838786a93f9df69f Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 3 Nov 2019 13:33:32 +0100 Subject: Add duration parsing tests --- src/main/java/pl/edu/mimuw/cloudatlas/model/ValueDuration.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/pl/edu') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueDuration.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueDuration.java index bf9d0e0..444ce78 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueDuration.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/ValueDuration.java @@ -152,6 +152,12 @@ public class ValueDuration extends ValueSimple { return result; } + /** + * @param matcher A regex matcher + * @param group The name of a group matched by matcher that + * should have captured a number. + * @return The parsed number. + */ private static long parseLongGroup(Matcher matcher, String group) { return Long.parseLong(matcher.group(group)); } -- cgit v1.2.3