gcspy.interpreter
Interface DataAccessor


public interface DataAccessor

This interface represents a stream and provides methods to interrogate the stream's contents.

Author:
Tony Printezis

Method Summary
 int get(int i)
          Get the value of a tile
 int getAdjusted(int i)
          Get the value of a tile, adjusted according to the stream's presentation style.
 int getAdjustedMax()
          Get the maximum value of a tile in this stream, adjusted according to the stream's presentation style.
 int getLength()
          Get the length of the stream
 boolean isDataAvailable()
          Is data available?
 boolean isOverflow(int i)
          Is the value of a tile greater than the maximum for this stream?
 boolean isZero(int i)
          Is the value of a tile zero?
 

Method Detail

get

int get(int i)
Get the value of a tile

Parameters:
i - The index of the tile
Returns:
Its value

getAdjusted

int getAdjusted(int i)
Get the value of a tile, adjusted according to the stream's presentation style.

Parameters:
i - The index of the tile
Returns:
Its value

getAdjustedMax

int getAdjustedMax()
Get the maximum value of a tile in this stream, adjusted according to the stream's presentation style.

Returns:
The maximum value

isZero

boolean isZero(int i)
Is the value of a tile zero?

Parameters:
i - The index of the tile
Returns:
true if the tile is zero.

isOverflow

boolean isOverflow(int i)
Is the value of a tile greater than the maximum for this stream?

Parameters:
i - The index of the tile
Returns:
true uf the tile's value exceeds the maximum.

isDataAvailable

boolean isDataAvailable()
Is data available?

Returns:
true if data is available for this stream

getLength

int getLength()
Get the length of the stream

Returns:
the length of the stream