/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
/** * Parses a {@code MutablePeriod} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */ public static MutablePeriod parse(String str, PeriodFormatter formatter) { return formatter.parsePeriod(str).toMutablePeriod(); }
MutablePeriod period = Period.ZERO.toMutablePeriod();
/** * Helper method to negate a copy of period * * @param mPeriod * @return a negated copy of period */ static Period negatePeriod(Period period) { MutablePeriod mPeriod = period.toMutablePeriod(); mPeriod.setYears(-mPeriod.getYears()); mPeriod.setMonths(-mPeriod.getMonths()); mPeriod.setWeeks(-mPeriod.getWeeks()); mPeriod.setDays(-mPeriod.getDays()); mPeriod.setHours(-mPeriod.getHours()); mPeriod.setMinutes(-mPeriod.getMinutes()); mPeriod.setSeconds(-mPeriod.getSeconds()); mPeriod.setMillis(-mPeriod.getMillis()); return mPeriod.toPeriod(); }
/** * Helper method to negate a copy of period * * @param mPeriod * @return a negated copy of period */ static Period negatePeriod(Period period) { MutablePeriod mPeriod = period.toMutablePeriod(); mPeriod.setYears(-mPeriod.getYears()); mPeriod.setMonths(-mPeriod.getMonths()); mPeriod.setWeeks(-mPeriod.getWeeks()); mPeriod.setDays(-mPeriod.getDays()); mPeriod.setHours(-mPeriod.getHours()); mPeriod.setMinutes(-mPeriod.getMinutes()); mPeriod.setSeconds(-mPeriod.getSeconds()); mPeriod.setMillis(-mPeriod.getMillis()); return mPeriod.toPeriod(); }