@Test public void getAtIndex() { assertThat(mTileList.addOrReplace(createTile(0, 1, 2, 3)), nullValue()); assertThat(mTileList.addOrReplace(createTile(3, 1, 2, 3)), nullValue()); assertThat(mTileList.addOrReplace(createTile(6, 1, 2, 3)), nullValue()); assertThat(mTileList.getAtIndex(0).mStartPosition, is(0)); assertThat(mTileList.getAtIndex(1).mStartPosition, is(3)); assertThat(mTileList.getAtIndex(2).mStartPosition, is(6)); assertThat(mTileList.getAtIndex(3), nullValue()); }
public Tile<T> getAtIndex(int index) { return mTiles.valueAt(index); }
TileList { public Tile<T> getAtIndex(int index) { return mTiles.valueAt(index); } }
TileList { public Tile<T> getAtIndex(int index) { return mTiles.valueAt(index); } TileList(int tileSize); }
TileList { public Tile<T> getAtIndex(int index) { return mTiles.valueAt(index); } TileList(int tileSize); T getItemAt(int pos); int size(); void clear(); Tile<T> getAtIndex(int index); Tile<T> addOrReplace(Tile<T> newTile); Tile<T> removeAtPos(int startPosition); }
TileList { public Tile<T> getAtIndex(int index) { return mTiles.valueAt(index); } TileList(int tileSize); T getItemAt(int pos); int size(); void clear(); Tile<T> getAtIndex(int index); Tile<T> addOrReplace(Tile<T> newTile); Tile<T> removeAtPos(int startPosition);  }