Package org.apache.solr.common.util

## Class Pair<T1,​T2>

- java.lang.Object
- - org.apache.solr.common.util.Pair<T1,​T2>

All Implemented Interfaces:
  `Serializable`, `MapSerializable`, `MapWriter`, `NavigableObject`, `org.noggit.JSONWriter.Writable`

    public class Pair<T1,​T2>
    extends Object
    implements Serializable, MapWriter

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

`MapWriter.EntryWriter`

### Field Summary

### Fields inherited from interface org.apache.solr.common.MapWriter

`EMPTY`

### Constructor Summary

Constructors
`Pair​(T1 key, T2 value)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `equals​(Object that)`
`T1` `first()`
`int` `hashCode()`
`static Pair` `parse​(Map<String,​?> m)`
`T2` `second()`
`String` `toString()`
`void` `writeMap​(MapWriter.EntryWriter ew)`

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

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

### Methods inherited from interface org.apache.solr.common.MapWriter

`append, jsonStr, toMap, write`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _get, _getStr, _getStr, _getStr, _size`

### Constructor Detail

#### Pair

    public Pair​(T1 key,
                T2 value)

### Method Detail

#### first

    public T1 first()

#### second

    public T2 second()

#### equals

    public boolean equals​(Object that)

Overrides:
  `equals` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### writeMap

    public void writeMap​(MapWriter.EntryWriter ew)
                  throws IOException

Specified by:
  `writeMap` in interface `MapWriter`
Throws:
  `IOException`

#### parse

    public static Pair parse​(Map<String,​?> m)