Package org.joda.time.format
Class PeriodFormatterBuilder.IgnorableAffix
java.lang.Object
org.joda.time.format.PeriodFormatterBuilder.IgnorableAffix
- All Implemented Interfaces:
PeriodFormatterBuilder.PeriodFieldAffix
- Direct Known Subclasses:
PeriodFormatterBuilder.CompositeAffix,PeriodFormatterBuilder.PluralAffix,PeriodFormatterBuilder.RegExAffix,PeriodFormatterBuilder.SimpleAffix
- Enclosing class:
PeriodFormatterBuilder
abstract static class PeriodFormatterBuilder.IgnorableAffix
extends Object
implements PeriodFormatterBuilder.PeriodFieldAffix
An affix that can be ignored.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(Set<PeriodFormatterBuilder.PeriodFieldAffix> periodFieldAffixesToIgnore) This method should be called only once.protected booleanmatchesOtherAffix(int textLength, String periodStr, int position) Checks if there is a match among the other affixes (stored internally) that is longer than the passed value (textLength).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.joda.time.format.PeriodFormatterBuilder.PeriodFieldAffix
calculatePrintedLength, getAffixes, parse, printTo, printTo, scan
-
Field Details
-
iOtherAffixes
-
-
Constructor Details
-
IgnorableAffix
IgnorableAffix()
-
-
Method Details
-
finish
Description copied from interface:PeriodFormatterBuilder.PeriodFieldAffixThis method should be called only once. After first call consecutive calls to this methods will have no effect. Causes this affix to ignore a match (parse and scan methods) if there is an affix in the passed list that holds affix text which satisfy both following conditions: - the affix text is also a match - the affix text is longer than the match from this object- Specified by:
finishin interfacePeriodFormatterBuilder.PeriodFieldAffix- Parameters:
periodFieldAffixesToIgnore- the affixes that should be ignored
-
matchesOtherAffix
Checks if there is a match among the other affixes (stored internally) that is longer than the passed value (textLength).- Parameters:
textLength- the length of the matchperiodStr- the Period string that will be parsedposition- the position in the Period string at which the parsing should be started.- Returns:
- true if the other affixes (stored internally) contain a match that is longer than the textLength parameter, false otherwise
-