Package org.apache.avro

# Class Conversions.DurationConversion

java.lang.Object
org.apache.avro.Conversion<TimePeriod>
org.apache.avro.Conversions.DurationConversion

Enclosing class:
  `Conversions`

public static class Conversions.DurationConversion extends Conversion<TimePeriod>

## Constructor Summary

Constructors
Constructor
Description
`DurationConversion()`

## Method Summary

Modifier and Type
Method
Description
`TimePeriod`
`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`Class<TimePeriod>`
`getConvertedType()`
Return the Java class representing the logical type.
`String`
`getLogicalTypeName()`
Return the logical type this class converts.
`Schema`
`getRecommendedSchema()`
`GenericFixed`
`toFixed(TimePeriod value, Schema schema, LogicalType type)`

### Methods inherited from class org.apache.avro.Conversion

`adjustAndSetValue, fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFloat, fromInt, fromLong, fromMap, fromRecord, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFloat, toInt, toLong, toMap, toRecord`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DurationConversion

public DurationConversion()

## Method Details

### getConvertedType

public Class<TimePeriod> getConvertedType()
Description copied from class: `Conversion`
Return the Java class representing the logical type.

Specified by:
  `getConvertedType` in class `Conversion<TimePeriod>`
Returns:
  a Java class returned by from methods and accepted by to methods

### getLogicalTypeName

public String getLogicalTypeName()
Description copied from class: `Conversion`
Return the logical type this class converts.

Specified by:
  `getLogicalTypeName` in class `Conversion<TimePeriod>`
Returns:
  a String logical type name

### getRecommendedSchema

public Schema getRecommendedSchema()

Overrides:
  `getRecommendedSchema` in class `Conversion<TimePeriod>`

### fromFixed

public TimePeriod fromFixed(GenericFixed value, Schema schema, LogicalType type)

Overrides:
  `fromFixed` in class `Conversion<TimePeriod>`

### toFixed

public GenericFixed toFixed(TimePeriod value, Schema schema, LogicalType type)

Overrides:
  `toFixed` in class `Conversion<TimePeriod>`