Java: How to create a vector lookup table to find object instances of parsed cartesian vector points
<p>I'm making a chess game and i am handling the direction in which pieces moves with "unit vectors".</p>

<p>For example. A pawn will generally have a unit vector of (0,1) as it can only move one space forward.</p>

<p>Because of this I am creating many instances that hold the same data. To prevent this and to prevent the wastage of system resources, i decide to hold a central lookup table to hold a list of all the position vectors that can be used on a board (9x9)</p>

<p>What would the best way to go about this be? Because I can't just have a Set of these vectors and find the one which has the same parsed cartesian points without a iteration, which i'd like to avoid</p>