SparseFieldMatrix extends AbstractFieldMatrix<T> { @Override public T getEntry(int row, int column) { checkRowIndex(row); checkColumnIndex(column); return entries.get(computeKey(row, column)); } SparseFieldMatrix(final Field<T> field);  SparseFieldMatrix(final Field<T> field,
                             final int rowDimension, final int columnDimension);  SparseFieldMatrix(SparseFieldMatrix<T> other);  SparseFieldMatrix(FieldMatrix<T> other); @Override void addToEntry(int row, int column, T increment); @Override FieldMatrix<T> copy(); @Override FieldMatrix<T> createMatrix(int rowDimension, int columnDimension); @Override int getColumnDimension(); @Override T getEntry(int row, int column); @Override int getRowDimension(); @Override void multiplyEntry(int row, int column, T factor); @Override void setEntry(int row, int column, T value);  }
@Test public void testGetEntry() { FieldMatrix<Fraction> m = createSparseMatrix(testData); Assert.assertEquals("get entry", m.getEntry(0, 1).doubleValue(), 2d, entryTolerance); try { m.getEntry(10, 4); Assert.fail("Expecting OutOfRangeException"); } catch (OutOfRangeException ex) { } }