From 5f3fb9afece2125cbeba79d61a8d88460b7878d7 Mon Sep 17 00:00:00 2001 From: Joshua Rahm Date: Tue, 27 Jan 2015 18:40:32 -0700 Subject: initial commit --- .../src/com/modulus/common/collections/Grid.java | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 project/JavaCommon/src/com/modulus/common/collections/Grid.java (limited to 'project/JavaCommon/src/com/modulus/common/collections/Grid.java') diff --git a/project/JavaCommon/src/com/modulus/common/collections/Grid.java b/project/JavaCommon/src/com/modulus/common/collections/Grid.java new file mode 100644 index 0000000..817a36c --- /dev/null +++ b/project/JavaCommon/src/com/modulus/common/collections/Grid.java @@ -0,0 +1,35 @@ +package com.modulus.common.collections; + +/** + * Interface describing an immutable grid interface. + * + * @author jrahm + * + * @param the type of object this grid holds + */ +public interface Grid { + /** + * Returns the object stored in + * row row and column + * col + * + * @param row the row of the object + * @param col the column of the object + * @return the object stored in that row and column + */ + public T get(int row, int col); + + /** + * Returns the number of columns in this grid + * + * @return the number of columns in this grid + */ + public int numberOfColumns(); + + /** + * Returns the number of columns in this grid. + * + * @return the number of columns in this grid + */ + public int numberOfRows(); +} -- cgit