public boolean equalValues(final Parameter parameter, final Object value1, final Object value2) { return ObjectUtils.equalObjects(value1, value2); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MagicWandModel that = (MagicWandModel) o; if (Double.compare(that.maxTolerance, maxTolerance) != 0) return false; if (Double.compare(that.minTolerance, minTolerance) != 0) return false; if (normalize != that.normalize) return false; if (Double.compare(that.tolerance, tolerance) != 0) return false; if (pixelTest != that.pixelTest) return false; if (pickMode != that.pickMode) return false; if (spectrumTransform != that.spectrumTransform) return false; if (!ObjectUtils.equalObjects(bandNames, that.bandNames)) return false; if (!ObjectUtils.equalObjects(plusSpectra.toArray(), that.plusSpectra.toArray())) return false; if (!ObjectUtils.equalObjects(minusSpectra.toArray(), that.minusSpectra.toArray())) return false; return true; }
public void setName(String name) { if (!ObjectUtils.equalObjects(this.name, name)) { this.name = name; invalidate(); } }
public void setMessageText(String messageText) { String oldValue = this.messageText; if (!ObjectUtils.equalObjects(oldValue, messageText)) { this.messageText = messageText; repaint(); } }
public void setFont(Font font) { if (!ObjectUtils.equalObjects(this.font, font)) { this.font = font; invalidate(); } }
public void setBackgroundColor(Color backgroundColor) { this.backgroundColor = backgroundColor; if (!ObjectUtils.equalObjects(this.backgroundColor, backgroundColor)) { this.backgroundColor = backgroundColor; invalidate(); } }
public void setMinorGridColor(Color minorGridColor) { if (!ObjectUtils.equalObjects(this.minorGridColor, minorGridColor)) { this.minorGridColor = minorGridColor; invalidate(); } }
public void setUnit(String unit) { if (!ObjectUtils.equalObjects(this.unit, unit)) { this.unit = unit; invalidate(); } }
public void setTextGap(int textGap) { if (!ObjectUtils.equalObjects(this.font, font)) { this.textGap = textGap; invalidate(); } }
public void setStyleCss(String styleCss) { if (!ObjectUtils.equalObjects(this.styleCss, styleCss)) { String oldValue = this.styleCss; this.styleCss = styleCss; fireProductNodeChanged(PROPERTY_NAME_STYLE_CSS, oldValue, this.styleCss); } }
public void setMajorGridColor(Color majorGridColor) { if (!ObjectUtils.equalObjects(this.majorGridColor, majorGridColor)) { this.majorGridColor = majorGridColor; invalidate(); } }
public void setForegroundColor(Color foregroundColor) { if (!ObjectUtils.equalObjects(this.foregroundColor, foregroundColor)) { this.foregroundColor = foregroundColor; invalidate(); } }
private void changeInternalProperty(String key, Object oldValue, Object newValue) { if (!ObjectUtils.equalObjects(oldValue, newValue)) { if (newValue != null) { _properties.setProperty(key, newValue.toString()); } else { _properties.remove(key); } firePropertyChange(key, oldValue, newValue); } } }
/** * Sets the auto-grouping applicable to product nodes contained in this product. * * @param autoGrouping The auto-grouping or {@code null}. * * @since BEAM 4.8 */ public void setAutoGrouping(AutoGrouping autoGrouping) { AutoGrouping old = this.autoGrouping; if (!ObjectUtils.equalObjects(old, autoGrouping)) { this.autoGrouping = autoGrouping; fireProductNodeChanged("autoGrouping", old, this.autoGrouping); } }
/** * Retrieves the sensorDb class for the given sensor name or <code>null</code> when no sensor of the name is in the * database. * * @param name the sensor name */ private SensorDb getSensorDb(String name) { SensorDb sensorDb = null; SensorDb current; for (SensorDb sensor : sensors) { current = sensor; if (ObjectUtils.equalObjects(name, current.getName())) { sensorDb = current; } } return sensorDb; }
/** * Retrieves the dabase entry for given band name and aerosol type. * * @param name the band name * @param aerosolType the aerosol type */ public BandDb getBand(String name, String aerosolType) { BandDb ret = null; BandDb current; for (BandDb band : bands) { current = band; if (ObjectUtils.equalObjects(name, current.getBandName()) && ObjectUtils.equalObjects(aerosolType, current.getAerosolType())) { ret = current; break; } } return ret; }
@Override public boolean equals(Object object) { if (!super.equals(object)) { return false; } MetadataAttribute attribute = (MetadataAttribute) object; return ObjectUtils.equalObjects(attribute.getData(), getData()); }
public void setPropertyValue(String key, Object value) { Object oldValue = null; if (_propertyChangeSupport != null) { oldValue = getPropertyValue(key); } if (_propertyMap == null) { _propertyMap = createPropertyMap(null); } _propertyMap.put(key, value); if (_propertyChangeSupport != null && !ObjectUtils.equalObjects(oldValue, value)) { _propertyChangeSupport.firePropertyChange(key, oldValue, value); } }
public void setXName(String xName) { Assert.notNull(xName, "xName"); if (!ObjectUtils.equalObjects(this.xName, xName)) { this.xName = xName; invalidate(); } }
public void setYName(String yName) { Assert.notNull(yName, "yName"); if (!ObjectUtils.equalObjects(this.yName, yName)) { this.yName = yName; invalidate(); } }