## org.apache.mahout.common
Class Pair<A,B>

    java.lang.Object
      org.apache.mahout.common.Pair<A,B>

All Implemented Interfaces:
  java.io.Serializable

    public final class Pair<A,B>

extends java.lang.Object
implements java.io.Serializable

A simple (ordered) pair of two objects. Elements may be null.

See Also:
  Serialized Form

Constructor Summary
`Pair(A first, B second)`

Method Summary
`boolean` `equals(java.lang.Object obj)`
`A` `getFirst()`
`B` `getSecond()`
`int` `hashCode()`
`Pair<B,A>` `swap()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Pair

    public Pair(A first,
                B second)

Method Detail

### getFirst

    public A getFirst()

### getSecond

    public B getSecond()

### swap

    public Pair<B,A> swap()

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.