public void ensureActive(Object... values) { Row row = null; ListIterator<Row> iterator = rows.listIterator(); while(iterator.hasNext()) { Row current = iterator.next(); boolean found = true; for(int i = 0; i < fieldCount; i++) { if(!ObjectUtils.equals(values[i], current.getValues()[i])) { found = false; break; } } if(found) { row = new Row(values, current.getLabels(), true); iterator.set(row); break; } } if(row == null) { String[] labels = new String[fieldCount]; for(int i = 0; i < fieldCount; i++) { labels[i] = ObjectUtils.toString(values[i]); } row = new Row(values, labels, true); rows.add(row); } }
Object[] currentValueRow = row.getValues(); String[] currentLabelRow = row.getLabels(); boolean matching = true; for (int j = 0; j < fieldCount; j++) { Option currentOption = optionsArray[j].get(cellValue); if(currentOption == null || !currentOption.active) { optionsArray[j].put(cellValue, new Option(cellValue, cellLabel, row.isActive()));
Object[] currentValueRow = row.getValues(); String[] currentLabelRow = row.getLabels(); boolean matching = true; for (int j = 0; j < fieldCount; j++) { Option currentOption = optionsArray[j].get(cellValue); if(currentOption == null || !currentOption.active) { optionsArray[j].put(cellValue, new Option(cellValue, cellLabel, row.isActive()));
public void ensureActive(Object... values) { Row row = null; ListIterator<Row> iterator = rows.listIterator(); while(iterator.hasNext()) { Row current = iterator.next(); boolean found = true; for(int i = 0; i < fieldCount; i++) { if(!ObjectUtils.equals(values[i], current.getValues()[i])) { found = false; break; } } if(found) { row = new Row(values, current.getLabels(), true); iterator.set(row); break; } } if(row == null) { String[] labels = new String[fieldCount]; for(int i = 0; i < fieldCount; i++) { labels[i] = ObjectUtils.toString(values[i]); } row = new Row(values, labels, true); rows.add(row); } }
public void appendRow(Object[] values, String[] labels, boolean active) { Row row = new Row(values, labels, active); appendRow(row); }
public void appendRow(Object[] values, String[] labels, boolean active) { Row row = new Row(values, labels, active); appendRow(row); }