Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.joda.time.convert
Interface PeriodConverter

All Superinterfaces:
  Converter

    public interface PeriodConverter

extends Converter

PeriodConverter defines how an object is converted to a time period.

Since:
  1.0
Author:
  Stephen Colebourne, Brian S O'Neill

Method Summary
`PeriodType` | `getPeriodType(java.lang.Object object)` Selects a suitable period type for the given object.
`void` | `setInto(ReadWritablePeriod period, java.lang.Object object, Chronology chrono)` Extracts duration values from an object of this converter's type, and sets them into the given ReadWritableDuration.

Methods inherited from interface org.joda.time.convert.Converter
`getSupportedType`

Method Detail

### setInto

    void setInto(ReadWritablePeriod period,
                 java.lang.Object object,
                 Chronology chrono)

  Extracts duration values from an object of this converter's type, and sets them into the given ReadWritableDuration.

  Parameters:
    `period` - the period to modify
    `object` - the object to convert, must not be null
    `chrono` - the chronology to use, must not be null
  Throws:
    `java.lang.ClassCastException` - if the object is invalid

### getPeriodType

    PeriodType getPeriodType(java.lang.Object object)

  Selects a suitable period type for the given object.

  Parameters:
    `object` - the object to examine, must not be null
  Returns:
    the period type, never null
  Throws:
    `java.lang.ClassCastException` - if the object is invalid

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD