/** * <p>Initializes the instance for first use.</p> */ private void init() { final List<Rule> rulesList = parsePattern(); mRules = rulesList.toArray(new Rule[rulesList.size()]); int len = 0; for (int i=mRules.length; --i >= 0; ) { len += mRules[i].estimateLength(); } mMaxLengthEstimate = len; }
/** * <p>Performs the formatting by applying the rules to the * specified calendar.</p> * * @param calendar the calendar to format * @param buf the buffer to format into * @param <B> the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer */ private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) { try { for (final Rule rule : mRules) { rule.appendTo(buf, calendar); } } catch (final IOException ioe) { ExceptionUtils.rethrow(ioe); } return buf; }
/** * <p>Performs the formatting by applying the rules to the * specified calendar.</p> * * @param calendar the calendar to format * @param buf the buffer to format into * @param <B> the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer */ private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) { try { for (final Rule rule : mRules) { rule.appendTo(buf, calendar); } } catch (final IOException ioe) { ExceptionUtils.rethrow(ioe); } return buf; }
/** * <p>Performs the formatting by applying the rules to the * specified calendar.</p> * * @param calendar the calendar to format * @param buf the buffer to format into * @param <B> the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer */ private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) { try { for (final Rule rule : mRules) { rule.appendTo(buf, calendar); } } catch (final IOException ioe) { ExceptionUtils.rethrow(ioe); } return buf; }
/** * <p>Initializes the instance for first use.</p> */ private void init() { final List<Rule> rulesList = parsePattern(); mRules = rulesList.toArray(new Rule[rulesList.size()]); int len = 0; for (int i=mRules.length; --i >= 0; ) { len += mRules[i].estimateLength(); } mMaxLengthEstimate = len; }
/** * <p>Initializes the instance for first use.</p> */ private void init() { final List<Rule> rulesList = parsePattern(); mRules = rulesList.toArray(new Rule[rulesList.size()]); int len = 0; for (int i=mRules.length; --i >= 0; ) { len += mRules[i].estimateLength(); } mMaxLengthEstimate = len; }
/** * <p>Initializes the instance for first use.</p> */ private void init() { final List<Rule> rulesList = parsePattern(); mRules = rulesList.toArray(new Rule[rulesList.size()]); int len = 0; for (int i=mRules.length; --i >= 0; ) { len += mRules[i].estimateLength(); } mMaxLengthEstimate = len; }
/** * <p>Performs the formatting by applying the rules to the * specified calendar.</p> * * @param calendar the calendar to format * @param buf the buffer to format into * @param <B> the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer */ private <B extends Appendable> B applyRules(final Calendar calendar, final B buf) { try { for (final Rule rule : mRules) { rule.appendTo(buf, calendar); } } catch (final IOException ioe) { ExceptionUtils.rethrow(ioe); } return buf; }