Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pokersource.util
Class LongArray

    java.lang.Object
      org.pokersource.util.LongArray

All Implemented Interfaces:
  java.lang.Comparable

Direct Known Subclasses:
  HandMatchup

    public class LongArray

extends java.lang.Object
implements java.lang.Comparable

A wrapper around a long[] that is suitable for use as a key in a Map. The equals() method is defined such that A.equals(B) iff A.values[i] == B.values[i] for all elements i. Similarly, the hashCode() method is defined so that A.equals(B) implies A.hashCode() == B.hashCode(). The compareTo() method is defined lexicographically, with shorter arrays comparing less than longer arrays having the same starting elements.

Author:
  Michael Maurer <mjmaurer@yahoo.com>

Field Summary
`private int` | `hash`
`long[]` | `values`

Constructor Summary
`LongArray(long[] values)`

Method Summary
`int` | `compareTo(java.lang.Object o)`
`private void` | `computeHash()`
`boolean` | `equals(java.lang.Object o)`
`int` | `hashCode()`
`java.lang.String` | `toString()`

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

Field Detail

### values

    public long[] values

### hash

    private int hash

Constructor Detail

### LongArray

    public LongArray(long[] values)

Method Detail

### computeHash

    private void computeHash()

### hashCode

    public int hashCode()

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

### equals

    public boolean equals(java.lang.Object o)

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

### compareTo

    public int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### toString

    public java.lang.String toString()

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD