@Test public void testGetInformationItemIndex() { relation.getColumn().add(new InformationItem()); relation.getColumn().add(new InformationItem()); assertEquals(0, getInformationItemIndex(relation, 1)); assertEquals(1, getInformationItemIndex(relation, 2)); }
public static int getInformationItemIndex(final Relation relation, final int columnIndex) { final int iiColumnCount = relation.getColumn().size(); int _columnIndex = columnIndex; if ((_columnIndex = _columnIndex - ROW_INDEX_COLUMN_COUNT) < 0) { throw new IllegalArgumentException("columnIndex referenced 'Row index' column. Should be a valid InformationItem column."); } if (_columnIndex > iiColumnCount - 1) { throw new IllegalArgumentException("columnIndex did not reference a valid InformationItem column."); } return _columnIndex; }
RelationUIModelMapperHelper { public static int getInformationItemIndex(final Relation relation, final int columnIndex) { final int iiColumnCount = relation.getColumn().size(); int _columnIndex = columnIndex; if ((_columnIndex = _columnIndex - ROW_INDEX_COLUMN_COUNT) < 0) { throw new IllegalArgumentException("columnIndex referenced 'Row index' column. Should be a valid InformationItem column."); } if (_columnIndex > iiColumnCount - 1) { throw new IllegalArgumentException("columnIndex did not reference a valid InformationItem column."); } return _columnIndex; } }
RelationUIModelMapperHelper { public static int getInformationItemIndex(final Relation relation, final int columnIndex) { final int iiColumnCount = relation.getColumn().size(); int _columnIndex = columnIndex; if ((_columnIndex = _columnIndex - ROW_INDEX_COLUMN_COUNT) < 0) { throw new IllegalArgumentException("columnIndex referenced 'Row index' column. Should be a valid InformationItem column."); } if (_columnIndex > iiColumnCount - 1) { throw new IllegalArgumentException("columnIndex did not reference a valid InformationItem column."); } return _columnIndex; }  }
RelationUIModelMapperHelper { public static int getInformationItemIndex(final Relation relation, final int columnIndex) { final int iiColumnCount = relation.getColumn().size(); int _columnIndex = columnIndex; if ((_columnIndex = _columnIndex - ROW_INDEX_COLUMN_COUNT) < 0) { throw new IllegalArgumentException("columnIndex referenced 'Row index' column. Should be a valid InformationItem column."); } if (_columnIndex > iiColumnCount - 1) { throw new IllegalArgumentException("columnIndex did not reference a valid InformationItem column."); } return _columnIndex; }  static RelationSection getSection(final Relation relation,
                                             final int columnIndex); static int getInformationItemIndex(final Relation relation,
                                              final int columnIndex); }
RelationUIModelMapperHelper { public static int getInformationItemIndex(final Relation relation, final int columnIndex) { final int iiColumnCount = relation.getColumn().size(); int _columnIndex = columnIndex; if ((_columnIndex = _columnIndex - ROW_INDEX_COLUMN_COUNT) < 0) { throw new IllegalArgumentException("columnIndex referenced 'Row index' column. Should be a valid InformationItem column."); } if (_columnIndex > iiColumnCount - 1) { throw new IllegalArgumentException("columnIndex did not reference a valid InformationItem column."); } return _columnIndex; }  static RelationSection getSection(final Relation relation,
                                             final int columnIndex); static int getInformationItemIndex(final Relation relation,
                                              final int columnIndex); static final int ROW_INDEX_COLUMN_COUNT; }