Package org.joda.time.format
Class PeriodFormatterBuilder.CompositeAffix
- java.lang.Object
-
- org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
-
- org.joda.time.format.PeriodFormatterBuilder.CompositeAffix
-
- All Implemented Interfaces:
PeriodFormatterBuilder.PeriodFieldAffix
- Enclosing class:
- PeriodFormatterBuilder
static class PeriodFormatterBuilder.CompositeAffix extends PeriodFormatterBuilder.IgnorableAffix
Builds a composite affix by merging two other affix implementations.
-
-
Field Summary
Fields Modifier and Type Field Description private PeriodFormatterBuilder.PeriodFieldAffix
iLeft
private java.lang.String[]
iLeftRightCombinations
private PeriodFormatterBuilder.PeriodFieldAffix
iRight
-
Constructor Summary
Constructors Constructor Description CompositeAffix(PeriodFormatterBuilder.PeriodFieldAffix left, PeriodFormatterBuilder.PeriodFieldAffix right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculatePrintedLength(int value)
java.lang.String[]
getAffixes()
int
parse(java.lang.String periodStr, int position)
void
printTo(java.io.Writer out, int value)
void
printTo(java.lang.StringBuffer buf, int value)
int
scan(java.lang.String periodStr, int position)
-
Methods inherited from class org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
finish, matchesOtherAffix
-
-
-
-
Field Detail
-
iLeft
private final PeriodFormatterBuilder.PeriodFieldAffix iLeft
-
iRight
private final PeriodFormatterBuilder.PeriodFieldAffix iRight
-
iLeftRightCombinations
private final java.lang.String[] iLeftRightCombinations
-
-
Constructor Detail
-
CompositeAffix
CompositeAffix(PeriodFormatterBuilder.PeriodFieldAffix left, PeriodFormatterBuilder.PeriodFieldAffix right)
-
-
Method Detail
-
calculatePrintedLength
public int calculatePrintedLength(int value)
-
printTo
public void printTo(java.lang.StringBuffer buf, int value)
-
printTo
public void printTo(java.io.Writer out, int value) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public int parse(java.lang.String periodStr, int position)
- Returns:
- new position after parsing affix, or ~position of failure
-
scan
public int scan(java.lang.String periodStr, int position)
- Returns:
- position where affix starts, or original ~position if not found
-
getAffixes
public java.lang.String[] getAffixes()
- Returns:
- a copy of array of affixes
-
-