diff options
| author | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-27 18:40:32 -0700 |
|---|---|---|
| committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-27 18:40:32 -0700 |
| commit | 5f3fb9afece2125cbeba79d61a8d88460b7878d7 (patch) | |
| tree | b0e1e60bae9927a9449561bf7fe9431a54d12be9 /project/JavaCommon/src/com/modulus/common/collections/Grid.java | |
| download | LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.gz LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.tar.bz2 LegacyQBar-5f3fb9afece2125cbeba79d61a8d88460b7878d7.zip | |
initial commit
Diffstat (limited to 'project/JavaCommon/src/com/modulus/common/collections/Grid.java')
| -rw-r--r-- | project/JavaCommon/src/com/modulus/common/collections/Grid.java | 35 |
1 files changed, 35 insertions, 0 deletions
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 <T> the type of object this grid holds + */ +public interface Grid<T> { + /** + * Returns the object stored in + * row <code>row</code> and column + * <code>col</code> + * + * @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(); +} |