Package org.apache.avro.mapred

# Class AvroWrapper<T>

java.lang.Object
org.apache.avro.mapred.AvroWrapper<T>

Direct Known Subclasses:
  `AvroKey`, `AvroValue`

public class AvroWrapper<T> extends Object
The wrapper of data for jobs configured with `AvroJob` .

## Constructor Summary

Constructors
Constructor
Description
`AvroWrapper()`
Wrap null.
`AvroWrapper(T datum)`
Wrap a datum.

## Method Summary

Modifier and Type
Method
Description
`T`
`datum()`
Return the wrapped datum.
`void`
`datum(T datum)`
Set the wrapped datum.
`boolean`
`equals(Object obj)`
`int`
`hashCode()`
`String`
`toString()`
Get the wrapped datum as JSON.

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AvroWrapper

public AvroWrapper()
Wrap null. Construct `AvroWrapper` wrapping no datum.

### AvroWrapper

public AvroWrapper(T datum)
Wrap a datum.

## Method Details

### datum

public T datum()
Return the wrapped datum.

### datum

public void datum(T datum)
Set the wrapped datum.

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### toString

public String toString()
Get the wrapped datum as JSON.

Overrides:
  `toString` in class `Object`