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

static class PeriodFormatterBuilder.SimpleAffix extends PeriodFormatterBuilder.IgnorableAffix
Implements an affix where the text does not vary by the amount.
  • Field Details

    • iText

      private final String iText
  • Constructor Details

    • SimpleAffix

      SimpleAffix(String text)
  • Method Details

    • calculatePrintedLength

      public int calculatePrintedLength(int value)
    • printTo

      public void printTo(StringBuffer buf, int value)
    • printTo

      public void printTo(Writer out, int value) throws IOException
      Throws:
      IOException
    • parse

      public int parse(String periodStr, int position)
      Parameters:
      periodStr - the period
      position - the position
      Returns:
      new position after parsing affix, or ~position of failure
    • scan

      public int scan(String periodStr, int position)
      Parameters:
      periodStr - the period
      position - the position
      Returns:
      position where affix starts, or original ~position if not found
    • getAffixes

      public String[] getAffixes()
      Returns:
      a copy of array of affixes