aboutsummaryrefslogtreecommitdiff
path: root/project/JavaCommon/src/com/modulus/common/collections/Grid.java
blob: 817a36c38e82d6c2acc44af39126edfa5839024f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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();
}