| java.lang.Object org.joda.time.convert.AbstractConverter org.joda.time.convert.StringConverter
Method Summary | |
public long | getDurationMillis(Object object) Gets the duration of the string using the standard type. | public long | getInstantMillis(Object object, Chronology chrono) Gets the millis, which is the ISO parsed string value. | public int[] | getPartialValues(ReadablePartial fieldSource, Object object, Chronology chrono, DateTimeFormatter parser) Extracts the values of the partial from an object of this converter's type. | public Class | getSupportedType() Returns String.class. | public void | setInto(ReadWritablePeriod period, Object object, Chronology chrono) Extracts duration values from an object of this converter's type, and
sets them into the given ReadWritableDuration. | public void | setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono) Sets the value of the mutable interval from the string. |
StringConverter | protected StringConverter()(Code) | | Restricted constructor.
|
getDurationMillis | public long getDurationMillis(Object object)(Code) | | Gets the duration of the string using the standard type.
This matches the toString() method of ReadableDuration.
Parameters: object - the String to convert, must not be null throws: ClassCastException - if the object is invalid |
getInstantMillis | public long getInstantMillis(Object object, Chronology chrono)(Code) | | Gets the millis, which is the ISO parsed string value.
Parameters: object - the String to convert, must not be null Parameters: chrono - the chronology to use, non-null result of getChronology the millisecond value throws: IllegalArgumentException - if the value if invalid |
getPartialValues | public int[] getPartialValues(ReadablePartial fieldSource, Object object, Chronology chrono, DateTimeFormatter parser)(Code) | | Extracts the values of the partial from an object of this converter's type.
This method checks if the parser has a zone, and uses it if present.
This is most useful for parsing local times with UTC.
Parameters: fieldSource - a partial that provides access to the fields.This partial may be incomplete and only getFieldType(int) should be used Parameters: object - the object to convert Parameters: chrono - the chronology to use, which is the non-null result of getChronology() Parameters: parser - the parser to use, may be null the array of field values that match the fieldSource, must be non-null valid throws: ClassCastException - if the object is invalid throws: IllegalArgumentException - if the value if invalid since: 1.3 |
getSupportedType | public Class getSupportedType()(Code) | | Returns String.class.
String.class |
setInto | public void setInto(ReadWritablePeriod period, Object object, Chronology chrono)(Code) | | Extracts duration values from an object of this converter's type, and
sets them into the given ReadWritableDuration.
Parameters: period - period to get modified Parameters: object - the String to convert, must not be null Parameters: chrono - the chronology to use the millisecond duration throws: ClassCastException - if the object is invalid |
setInto | public void setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono)(Code) | | Sets the value of the mutable interval from the string.
Parameters: writableInterval - the interval to set Parameters: object - the String to convert, must not be null Parameters: chrono - the chronology to use, may be null |
|
|