org.pokersource.util

Class LongArray

Implemented Interfaces:
Comparable
Known Direct Subclasses:
HandMatchup

public class LongArray
extends java.lang.Object
implements 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

long[]
values

Constructor Summary

LongArray(values[] )

Method Summary

int
compareTo(Object o)
boolean
equals(Object o)
int
hashCode()
String
toString()

Field Details

values

public long[] values

Constructor Details

LongArray

public LongArray(values[] )

Method Details

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object o)

hashCode

public int hashCode()

toString

public String toString()

PokerSource Home Page - Learn how you can contribute!