Class PeriodFormatterBuilder.IgnorableAffix

    • Field Detail

      • iOtherAffixes

        private volatile java.lang.String[] iOtherAffixes
    • Constructor Detail

      • IgnorableAffix

        IgnorableAffix()
    • Method Detail

      • finish

        public void finish​(java.util.Set<PeriodFormatterBuilder.PeriodFieldAffix> periodFieldAffixesToIgnore)
        Description copied from interface: PeriodFormatterBuilder.PeriodFieldAffix
        This 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:
        finish in interface PeriodFormatterBuilder.PeriodFieldAffix
      • matchesOtherAffix

        protected boolean matchesOtherAffix​(int textLength,
                                            java.lang.String periodStr,
                                            int position)
        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 match
        periodStr - the Period string that will be parsed
        position - 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