Package com.jidesoft.converter
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 Summary
Fields Modifier and Type Field Description static ConverterContextCONTEXTDefault ConverterContext for MonthConverter.-
Fields inherited from class com.jidesoft.converter.NumberConverter
CONTEXT_FRACTION_NUMBER
-
-
Constructor Summary
Constructors Constructor Description YearNameConverter()Creates a new CalendarConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfromString(java.lang.String string, ConverterContext context)Converts from String to an object.protected java.text.NumberFormatgetDefaultNumberFormat()Gets the NumberFormat for Locale.US.booleansupportFromString(java.lang.String string, ConverterContext context)If it supports fromString.-
Methods inherited from class com.jidesoft.converter.NumberConverter
getNumberFormat, isAvoidNegativeZero, isGroupingUsed, parseNumber, setAvoidNegativeZero, setCurrency, setFractionDigits, setGroupingUsed, setIntegerDigits, setNumberFormat, setRoundingMode, supportToString, toString
-
-
-
-
Field Detail
-
CONTEXT
public static ConverterContext CONTEXT
Default ConverterContext for MonthConverter.
-
-
Method Detail
-
getDefaultNumberFormat
protected java.text.NumberFormat getDefaultNumberFormat()
Description copied from class:NumberConverterGets the NumberFormat for Locale.US.- Overrides:
getDefaultNumberFormatin classNumberConverter- Returns:
- the NumberFormat for Locale.US.
-
fromString
public java.lang.Object fromString(java.lang.String string, ConverterContext context)Description copied from interface:ObjectConverterConverts from String to an object.- Parameters:
string- the stringcontext- context to be converted- Returns:
- the object converted from string
-
supportFromString
public boolean supportFromString(java.lang.String string, ConverterContext context)Description copied from interface:ObjectConverterIf it supports fromString.- Parameters:
string- the stringcontext- context to be converted- Returns:
- true if it supports
-
-