@Override public boolean equals(Object obj) { if (obj == null) return false; try { DataColumn d = (DataColumn) obj; return getId().equals(d.getId()); } catch (ClassCastException e) { return false; } }
@Override public boolean equals(Object obj) { if (obj == null) return false; try { DataColumn d = (DataColumn) obj; return getId().equals(d.getId()); } catch (ClassCastException e) { return false; } }
@Override public int getColumnIndex( DataColumn dataColumn ) { if (dataColumn == null || "".equals(dataColumn.getId())) { throw new IllegalArgumentException("Wrong column specified."); } for (int i = 0; i < columns.size(); i++) { if ( dataColumn.getId().equalsIgnoreCase( columns.get( i ).getId() ) ) return i; } throw new IllegalArgumentException( "The column with id " + dataColumn.getId() + " does not exist." ); }
@Override public int getColumnIndex( DataColumn dataColumn ) { if (dataColumn == null || "".equals(dataColumn.getId())) { throw new IllegalArgumentException("Wrong column specified."); } for (int i = 0; i < columns.size(); i++) { if ( dataColumn.getId().equalsIgnoreCase( columns.get( i ).getId() ) ) return i; } throw new IllegalArgumentException( "The column with id " + dataColumn.getId() + " does not exist." ); }
public DataColumn cloneEmpty() { DataColumnImpl otherCol = new DataColumnImpl(); otherCol.setId(getId()); otherCol.setColumnType(getColumnType()); if (columnGroup != null) otherCol.setColumnGroup(columnGroup.cloneInstance()); otherCol.setIntervalType(getIntervalType()); otherCol.setMinValue(getMinValue()); otherCol.setMaxValue(getMaxValue()); if (groupFunction != null) otherCol.setGroupFunction(groupFunction.cloneInstance()); return otherCol; }
public DataColumn cloneEmpty() { DataColumnImpl otherCol = new DataColumnImpl(); otherCol.setId(getId()); otherCol.setColumnType(getColumnType()); if (columnGroup != null) otherCol.setColumnGroup(columnGroup.cloneInstance()); otherCol.setIntervalType(getIntervalType()); otherCol.setMinValue(getMinValue()); otherCol.setMaxValue(getMaxValue()); if (groupFunction != null) otherCol.setGroupFunction(groupFunction.cloneInstance()); return otherCol; }