This method is useful for adding a separator each time around the loop except the first.
for (Iterator it = list.iterator(); it.hasNext(); ) { appendSeparator(","); append(it.next()); }Note that for this simple example, you should use {@link #appendWithSeparators(Collection,String)}. @param separator the separator to use, null means no separator @return this, to enable chaining @since 2.3
For example, builder.appendDays().appendSeparator(",").appendHours()
will only output the comma if both the days and hours fields are output.
The text will be parsed case-insensitively.
Note: appending a separator discontinues any further work on the latest appended field. @param text the text to use as a separator @return this PeriodFormatterBuilder @throws IllegalStateException if this separator follows a previous one
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|