com.jidesoft.converter
Class YearNameConverter

java.lang.Object
  extended by com.jidesoft.converter.NumberConverter
      extended by 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
static ConverterContext CONTEXT
          Default ConverterContext for MonthConverter.
 
Fields inherited from class com.jidesoft.converter.NumberConverter
CONTEXT_FRACTION_NUMBER
 
Constructor Summary
YearNameConverter()
          Creates a new CalendarConverter.
 
Method Summary
 Object fromString(String string, ConverterContext context)
          Converts from String to an object.
protected  NumberFormat getDefaultNumberFormat()
          Gets the NumberFormat for Locale.US.
 boolean supportFromString(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT

public static ConverterContext CONTEXT
Default ConverterContext for MonthConverter.

Constructor Detail

YearNameConverter

public YearNameConverter()
Creates a new CalendarConverter.

Method Detail

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


Copyright © 2014. All rights reserved.