public EqualsBuilder append(Object o1, Object o2) { if (equals) { equals = equals(o1, o2); } return this; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (getClass() == obj.getClass()) { DataSetTableModel that = (DataSetTableModel) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(_materializedRows, that._materializedRows); eb.append(_selectItems, that._selectItems); return eb.isEquals(); } return false; }
public boolean equalsIgnoreAlias(SelectItem that, boolean exactColumnCompare) { if (that == null) { return false; } if (that == this) { return true; } final EqualsBuilder eb = new EqualsBuilder(); if (exactColumnCompare) { eb.append(this._column == that._column); eb.append(this._fromItem, that._fromItem); } else { eb.append(this._column, that._column); } eb.append(this._function, that._function); eb.appendArrays(this._functionParameters, that._functionParameters); eb.append(this._functionApproximationAllowed, that._functionApproximationAllowed); eb.append(this._expression, that._expression); if (_subQuerySelectItem != null) { eb.append(_subQuerySelectItem.equalsIgnoreAlias(that._subQuerySelectItem)); } else { if (that._subQuerySelectItem != null) { eb.append(false); } } return eb.isEquals(); }
public EqualsBuilder appendArrays(Object[] o1, Object[] o2) { if (equals) { if (o1 == null) { o1 = new Object[0]; } if (o2 == null) { o2 = new Object[0]; } if (o1.length != o2.length) { equals = false; } else { for (int i = 0; i < o1.length; i++) { append(o1[i], o2[i]); } } } return this; }
public EqualsBuilder appendArrays(Object[] o1, Object[] o2) { if (equals) { if (o1 == null) { o1 = new Object[0]; } if (o2 == null) { o2 = new Object[0]; } if (o1.length != o2.length) { equals = false; } else { for (int i = 0; i < o1.length; i++) { append(o1[i], o2[i]); } } } return this; }
public EqualsBuilder append(Object o1, Object o2) { if (equals) { equals = equals(o1, o2); } return this; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (getClass() == obj.getClass()) { DataSetTableModel that = (DataSetTableModel) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(_materializedRows, that._materializedRows); eb.append(_selectItems, that._selectItems); return eb.isEquals(); } return false; }
public boolean equalsIgnoreAlias(SelectItem that, boolean exactColumnCompare) { if (that == null) { return false; } if (that == this) { return true; } final EqualsBuilder eb = new EqualsBuilder(); if (exactColumnCompare) { eb.append(this._column == that._column); eb.append(this._fromItem, that._fromItem); } else { eb.append(this._column, that._column); } eb.append(this._function, that._function); eb.appendArrays(this._functionParameters, that._functionParameters); eb.append(this._functionApproximationAllowed, that._functionApproximationAllowed); eb.append(this._expression, that._expression); if (_subQuerySelectItem != null) { eb.append(_subQuerySelectItem.equalsIgnoreAlias(that._subQuerySelectItem)); } else { if (that._subQuerySelectItem != null) { eb.append(false); } } return eb.isEquals(); }
/** * Sets the background (fill) color of the style * * @param color * the color to use * @return the {@link StyleBuilder} self (for cascading method calls) */ public StyleBuilder background(Color color) { if (EqualsBuilder.equals(_defaultBackgroundColor, color)) { _backgroundColor = null; } else { _backgroundColor = color; } return this; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }
/** * Sets the foreground (text) color of the style * * @param color * the color to use * @return the {@link StyleBuilder} self (for cascading method calls) */ public StyleBuilder foreground(Color color) { if (EqualsBuilder.equals(_defaultForegroundColor, color)) { _foregroundColor = null; } else { _foregroundColor = color; } return this; }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof Schema) { Schema other = (Schema) obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(getName(), other.getName()); eb.append(getQuote(), other.getQuote()); if (eb.isEquals()) { try { int tableCount1 = getTableCount(); int tableCount2 = other.getTableCount(); eb.append(tableCount1, tableCount2); } catch (Exception e) { // might occur when schemas are disconnected. Omit this // check then. } } return eb.isEquals(); } return false; }
/** * Sets the foreground (text) color of the style * * @param color * the color to use * @return the {@link StyleBuilder} self (for cascading method calls) */ public StyleBuilder foreground(Color color) { if (EqualsBuilder.equals(_defaultForegroundColor, color)) { _foregroundColor = null; } else { _foregroundColor = color; } return this; }
EqualsBuilder eb = new EqualsBuilder(); Object next1 = it1.next(); Object next2 = it2.next(); eb.append(next1, next2); return eb.isEquals();
/** * Sets the background (fill) color of the style * * @param color * the color to use * @return the {@link StyleBuilder} self (for cascading method calls) */ public StyleBuilder background(Color color) { if (EqualsBuilder.equals(_defaultBackgroundColor, color)) { _backgroundColor = null; } else { _backgroundColor = color; } return this; }
EqualsBuilder eb = new EqualsBuilder(); Object next1 = it1.next(); Object next2 = it2.next(); eb.append(next1, next2); return eb.isEquals();
@Override public int compare(String o1, String o2) { if (EqualsBuilder.equals(o1, o2)) { return 0; } // use length as the primary differentiator, to make sure long // packages are placed before short ones. int diff = o1.length() - o2.length(); if (diff == 0) { diff = o1.compareTo(o2); } return diff; } };
@Override public void setComponentRequirement(final ComponentRequirement requirement) { if (!EqualsBuilder.equals(_componentRequirement, requirement)) { _componentRequirement = requirement; onRequirementChanged(); } }
@Override public void setComponentRequirement(final ComponentRequirement requirement) { if (!EqualsBuilder.equals(_componentRequirement, requirement)) { _componentRequirement = requirement; onRequirementChanged(); } }
final Object value1 = _properties.get(propertyDescriptor); final Object value2 = otherProperties.get(propertyDescriptor); final boolean equals = EqualsBuilder.equals(value1, value2); if (!equals) { return false;