Package org.joda.time.format
Class PeriodFormatterBuilder.PluralAffix
java.lang.Object
org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
org.joda.time.format.PeriodFormatterBuilder.PluralAffix
- All Implemented Interfaces:
PeriodFormatterBuilder.PeriodFieldAffix
- Enclosing class:
PeriodFormatterBuilder
Implements an affix where the text varies by the amount of the field.
Only singular (1) and plural (not 1) are supported.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalculatePrintedLength(int value) String[]intvoidvoidprintTo(StringBuffer buf, int value) intMethods inherited from class org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
finish, matchesOtherAffix
-
Field Details
-
iSingularText
-
iPluralText
-
-
Constructor Details
-
PluralAffix
-
-
Method Details
-
calculatePrintedLength
public int calculatePrintedLength(int value) -
printTo
-
printTo
- Throws:
IOException
-
parse
- Parameters:
periodStr- the periodposition- the position- Returns:
- new position after parsing affix, or ~position of failure
-
scan
- Parameters:
periodStr- the periodposition- the position- Returns:
- position where affix starts, or original ~position if not found
-
getAffixes
- Returns:
- a copy of array of affixes
-