org.apache.avro

## Class SchemaCompatibility.SchemaPairCompatibility

- java.lang.Object
- - org.apache.avro.SchemaCompatibility.SchemaPairCompatibility

Enclosing class:
  SchemaCompatibility

    public static final class SchemaCompatibility.SchemaPairCompatibility
    extends Object

Provides information about the compatibility of a single reader and writer schema pair. Note: This class represents a one-way relationship from the reader to the writer schema.

### Constructor Summary

Constructors
Constructor and Description
`SchemaPairCompatibility(SchemaCompatibility.SchemaCompatibilityResult result, Schema reader, Schema writer, String description)` Constructs a new instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object other)`
`String` `getDescription()` Gets a human readable description of this validation result.
`Schema` `getReader()` Gets the reader schema that was validated.
`SchemaCompatibility.SchemaCompatibilityResult` `getResult()` Gets more details about the compatibility, in particular if getType() is INCOMPATIBLE.
`SchemaCompatibility.SchemaCompatibilityType` `getType()` Gets the type of this result.
`Schema` `getWriter()` Gets the writer schema that was validated.
`int` `hashCode()`
`String` `toString()`

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

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

### Constructor Detail

#### SchemaPairCompatibility

    public SchemaPairCompatibility(SchemaCompatibility.SchemaCompatibilityResult result,
                                   Schema reader,
                                   Schema writer,
                                   String description)

Constructs a new instance.

Parameters:
  `result` - The result of the compatibility check.
  `reader` - schema that was validated.
  `writer` - schema that was validated.
  `description` - of this compatibility result.

### Method Detail

#### getType

    public SchemaCompatibility.SchemaCompatibilityType getType()

Gets the type of this result.

Returns:
  the type of this result.

#### getResult

    public SchemaCompatibility.SchemaCompatibilityResult getResult()

Gets more details about the compatibility, in particular if getType() is INCOMPATIBLE.

Returns:
  the details of this compatibility check.

#### getReader

    public Schema getReader()

Gets the reader schema that was validated.

Returns:
  reader schema that was validated.

#### getWriter

    public Schema getWriter()

Gets the writer schema that was validated.

Returns:
  writer schema that was validated.

#### getDescription

    public String getDescription()

Gets a human readable description of this validation result.

Returns:
  a human readable description of this validation result.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### equals

    public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`