public interface

PeriodConverter

implements Converter
org.joda.time.convert.PeriodConverter

Class Overview

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

Summary

Public Methods
abstract PeriodType getPeriodType(Object object)
Selects a suitable period type for the given object.
abstract 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.
[Expand]
Inherited Methods
From interface org.joda.time.convert.Converter

Public Methods

public abstract PeriodType getPeriodType (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
ClassCastException if the object is invalid

public abstract 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.

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
ClassCastException if the object is invalid