Package org.joda.time.format
Class PeriodFormatterBuilder.SimpleAffix
java.lang.Object
org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
org.joda.time.format.PeriodFormatterBuilder.SimpleAffix
- All Implemented Interfaces:
PeriodFormatterBuilder.PeriodFieldAffix
- Enclosing class:
PeriodFormatterBuilder
Implements an affix where the text does not vary by the amount.
-
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
-
iText
-
-
Constructor Details
-
SimpleAffix
SimpleAffix(String text)
-
-
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
-