Class YearNameConverter

java.lang.Object
com.jidesoft.converter.NumberConverter
com.jidesoft.converter.YearNameConverter
All Implemented Interfaces:
ObjectConverter

public class YearNameConverter extends NumberConverter
Converter which converts year to int and converts it back. It is no difference from a number converter except it doesn't use grouping when formatting.
  • Field Details

    • CONTEXT

      public static ConverterContext CONTEXT
      Default ConverterContext for MonthConverter.
  • Constructor Details

    • YearNameConverter

      public YearNameConverter()
      Creates a new CalendarConverter.
  • Method Details

    • getDefaultNumberFormat

      protected NumberFormat getDefaultNumberFormat()
      Description copied from class: NumberConverter
      Gets the NumberFormat for Locale.US.
      Overrides:
      getDefaultNumberFormat in class NumberConverter
      Returns:
      the NumberFormat for Locale.US.
    • fromString

      public Object fromString(String string, ConverterContext context)
      Description copied from interface: ObjectConverter
      Converts from String to an object.
      Parameters:
      string - the string
      context - context to be converted
      Returns:
      the object converted from string
    • supportFromString

      public boolean supportFromString(String string, ConverterContext context)
      Description copied from interface: ObjectConverter
      If it supports fromString.
      Parameters:
      string - the string
      context - context to be converted
      Returns:
      true if it supports