/** * Creates a timespan from a list of other timespans. * * @return a timespan representing the sum of all the timespans provided */ public static Timespan create(Timespan... timespans) { if (timespans == null) { return null; } if (timespans.length == 0) { return ZERO_MILLISECONDS; } Timespan res = timespans[0]; for (int i = 1; i < timespans.length; i++) { Timespan timespan = timespans[i]; res = res.add(timespan); } return res; }
/** * Creates a timespan from a list of other timespans. * * @return a timespan representing the sum of all the timespans provided */ public static Timespan create(Timespan... timespans) { if (timespans == null) { return null; } if (timespans.length == 0) { return ZERO_MILLISECONDS; } Timespan res = timespans[0]; for (int i = 1; i < timespans.length; i++) { Timespan timespan = timespans[i]; res = res.add(timespan); } return res; }
res = timespan; } else { res = res.add(timespan);
res = timespan; } else { res = res.add(timespan);