## org.apache.mahout.common
Class LongPair

    java.lang.Object
      org.apache.mahout.common.LongPair

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<LongPair>

    public final class LongPair

extends java.lang.Object
implements java.lang.Comparable<LongPair>, java.io.Serializable

A simple (ordered) pair of longs.

See Also:
  Serialized Form

Constructor Summary
`LongPair(long first, long second)`

Method Summary
`int` `compareTo(LongPair o)`
`boolean` `equals(java.lang.Object obj)`
`long` `getFirst()`
`long` `getSecond()`
`int` `hashCode()`
`LongPair` `swap()`
`java.lang.String` `toString()`

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

Constructor Detail

### LongPair

    public LongPair(long first,
                    long second)

Method Detail

### getFirst

    public long getFirst()

### getSecond

    public long getSecond()

### swap

    public LongPair 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`

### compareTo

    public int compareTo(LongPair o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<LongPair>`

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