Results implements ImmutableBean { public ResultRow get(int rowIndex) { if (rowIndex < 0 || rowIndex >= _rows.size()) { throw new IndexOutOfBoundsException("Index " + rowIndex + " is out of bounds. row count = " + _rows.size()); } return _rows.get(rowIndex); } Results(List<String> columnNames, List<ResultRow> rows,
          Map<String, ResultItem> nonPortfolioResults, boolean isPendingMarketData,
          ViewTimer timer); @ImmutableConstructor private  Results(List<String> columnNames,
                  List<ResultRow> rows,
                  Map<String, ResultItem> nonPortfolioResults,
                  boolean isPendingMarketData,
                  ViewTimer timer,
                  ViewInputs viewInputs); Results withViewInputs(ViewInputs viewInputs); ResultRow get(int rowIndex); ResultItem get(int rowIndex, int columnIndex); ResultItem get(int rowIndex, String columnName); ResultItem get(String nonPortfolioOutputName); int getColumnIndex(String columnName); @Override String toString(); static Results.Meta meta(); static Results.Builder builder(); @Override Results.Meta metaBean(); @Override Property<R> property(String propertyName); @Override Set<String> propertyNames(); List<String> getColumnNames(); List<ResultRow> getRows(); Map<String, ResultItem> getNonPortfolioResults(); boolean isPendingMarketData(); ViewTimer getViewTimer(); ViewInputs getViewInputs(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test(expectedExceptions = IndexOutOfBoundsException.class) public void getByInvalidRowIndex() { RESULTS.get(2, 0); }
@Test(expectedExceptions = IndexOutOfBoundsException.class) public void getByInvalidColumnIndex() { RESULTS.get(0, 2); }
@Test public void getRow() { assertEquals(row("input2", "item21", "item22"), RESULTS.get(1)); }
@Test public void getByColumnName() { assertEquals("item11", RESULTS.get(0, "col1").getResult().getValue()); assertEquals("item22", RESULTS.get(1, "col2").getResult().getValue()); }
@Test(expectedExceptions = IllegalArgumentException.class) public void getByUnknownColumnName() { RESULTS.get(0, "col3"); }
@Test(expectedExceptions = IndexOutOfBoundsException.class) public void getByColumnNameAndInvalidRowIndex() { RESULTS.get(2, "col1"); }
@Test public void getByIndex() { assertEquals("item11", RESULTS.get(0, 0).getResult().getValue()); assertEquals("item22", RESULTS.get(1, 1).getResult().getValue()); }