Modifier and Type | Method and Description |
---|---|
static void |
adjustCacheSize(int width,
int height)
Adjust the cache if needed, to fit given dimensions.
|
static Int2D |
get(int x,
int y)
Gets
Int2D object for given location from cache. |
static int |
getHeight() |
static int |
getWidth() |
public static void adjustCacheSize(int width, int height)
NOTE: The maximum obtainable object will be
(width-1, height-1)
.
width
- the width of the cacheheight
- the height of the cachepublic static Int2D get(int x, int y)
Int2D
object for given location from cache. The cache needs
to be adjusted to contain the requested location before calling this
method.x
- the x-coordinate for the locationy
- the y-coordinate for the locationInt2D
object for given locationNullPointerException
- if the requested location is not storedpublic static final int getWidth()
public static final int getHeight()