Class IPointHash.LongImpl
java.lang.Object
com.github.yellowstonegames.grid.IPointHash.LongImpl
- All Implemented Interfaces:
IPointHash
- Direct Known Subclasses:
FlawedPointHash.CubeHash, FlawedPointHash.FlowerHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash, FlawedPointHash.SquishedCubeHash, LongPointHash
- Enclosing interface:
IPointHash
A convenience abstract class to implement IPointHash when you have a long for state. Subclasses will need to
implement
IPointHash.hashWithState(int, int, int), IPointHash.hashWithState(int, int, int, int),
IPointHash.hashWithState(int, int, int, int, int), IPointHash.hashWithState(int, int, int, int, int, int), an
IPointHash.hashWithState(int, int, int, int, int, int, int).
They can optionally override setState(int) or setState(long), and can at their discretion
provide an accessor for the protected long state.-
Nested Class Summary
Nested classes/interfaces inherited from interface IPointHash
IPointHash.IntImpl, IPointHash.LongImpl -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IPointHash
hashWithState, hashWithState, hashWithState, hashWithState, hashWithState, hashWithState
-
Field Details
-
state
protected long state
-
-
Constructor Details
-
LongImpl
public LongImpl() -
LongImpl
public LongImpl(int state) -
LongImpl
public LongImpl(long state)
-
-
Method Details
-
setState
public void setState(int state) - Specified by:
setStatein interfaceIPointHash
-
setState
public void setState(long state) -
hash
public int hash(int x, int y) - Specified by:
hashin interfaceIPointHash
-
hash
public int hash(int x, int y, int z) - Specified by:
hashin interfaceIPointHash
-
hash
public int hash(int x, int y, int z, int w) - Specified by:
hashin interfaceIPointHash
-
hash
public int hash(int x, int y, int z, int w, int u) - Specified by:
hashin interfaceIPointHash
-
hash
public int hash(int x, int y, int z, int w, int u, int v) - Specified by:
hashin interfaceIPointHash
-