List of usage examples for org.apache.commons.lang ObjectUtils equals
public static boolean equals(Object object1, Object object2)
Compares two objects for equality, where either one or both objects may be null
.
ObjectUtils.equals(null, null) = true ObjectUtils.equals(null, "") = false ObjectUtils.equals("", null) = false ObjectUtils.equals("", "") = true ObjectUtils.equals(Boolean.TRUE, null) = false ObjectUtils.equals(Boolean.TRUE, "true") = false ObjectUtils.equals(Boolean.TRUE, Boolean.TRUE) = true ObjectUtils.equals(Boolean.TRUE, Boolean.FALSE) = false
From source file:com.aurel.track.persist.BaseTApplicationContext.java
/** * Set the value of LoggedLimitedUsers//from w w w . ja v a2 s . c o m * * @param v new value */ public void setLoggedLimitedUsers(Integer v) { if (!ObjectUtils.equals(this.loggedLimitedUsers, v)) { this.loggedLimitedUsers = v; setModified(true); } }
From source file:com.aurel.track.persist.BaseTLoggedInUsers.java
/** * Set the value of NodeAddress/*from w ww . j a va2s .co m*/ * * @param v new value */ public void setNodeAddress(Integer v) throws TorqueException { if (!ObjectUtils.equals(this.nodeAddress, v)) { this.nodeAddress = v; setModified(true); } if (aTClusterNode != null && !ObjectUtils.equals(aTClusterNode.getObjectID(), v)) { aTClusterNode = null; } }
From source file:krasa.formatter.settings.ProjectSettingsComponent.java
private boolean isSameId() { return ObjectUtils.equals(form.getDisplayedSettings().getId(), settings.getId()); }
From source file:com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureOptionPremiumTransaction.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w . j a va 2 s .c o m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final InterestRateFutureOptionPremiumTransaction other = (InterestRateFutureOptionPremiumTransaction) obj; if (!ObjectUtils.equals(_premium, other._premium)) { return false; } if (_quantity != other._quantity) { return false; } if (Double.doubleToLongBits(_tradePrice) != Double.doubleToLongBits(other._tradePrice)) { return false; } if (!ObjectUtils.equals(_underlyingOption, other._underlyingOption)) { return false; } return true; }
From source file:com.haulmont.cuba.desktop.gui.components.DesktopFilterHelper.java
@Override public void addShortcutListener(TextField textField, final ShortcutListener listener) { final JTextField dTextField = (JTextField) DesktopComponentsHelper.unwrap(textField); final KeyStroke keyStroke = DesktopComponentsHelper.convertKeyCombination(listener.getKeyCombination()); dTextField.addKeyListener(new KeyAdapter() { @Override// w ww. j a va 2 s .c o m public void keyReleased(KeyEvent e) { if (ObjectUtils.equals(e.getKeyCode(), keyStroke.getKeyCode()) && ObjectUtils.equals(e.getModifiers(), keyStroke.getModifiers())) { listener.handleShortcutPressed(); } } }); }
From source file:com.aurel.track.persist.BaseTMotd.java
/** * Set the value of TeaserText/*from w w w.j a va 2 s .c om*/ * * @param v new value */ public void setTeaserText(String v) { if (!ObjectUtils.equals(this.teaserText, v)) { this.teaserText = v; setModified(true); } }
From source file:com.aurel.track.persist.BaseTWorkflowComment.java
/** * Set the value of Workflow//from w w w . j ava 2s .c o m * * @param v new value */ public void setWorkflow(Integer v) throws TorqueException { if (!ObjectUtils.equals(this.workflow, v)) { this.workflow = v; setModified(true); } if (aTWorkflowDef != null && !ObjectUtils.equals(aTWorkflowDef.getObjectID(), v)) { aTWorkflowDef = null; } }
From source file:com.opengamma.financial.analytics.cashflow.FloatingPaymentMatrix.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }/*from w w w . ja v a 2 s. c om*/ if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final FloatingPaymentMatrix other = (FloatingPaymentMatrix) obj; return ObjectUtils.equals(_values, other._values); }
From source file:com.aurel.track.persist.BaseTUserLevelSetting.java
/** * Set the value of ACTIONKEY/*from www. j a v a 2 s. c om*/ * * @param v new value */ public void setACTIONKEY(Integer v) { if (!ObjectUtils.equals(this.aCTIONKEY, v)) { this.aCTIONKEY = v; setModified(true); } }
From source file:com.aurel.track.persist.BaseTProjectCategory.java
/** * Set the value of ObjectID/*from ww w . j a v a 2 s . c o m*/ * * @param v new value */ public void setObjectID(Integer v) throws TorqueException { if (!ObjectUtils.equals(this.objectID, v)) { this.objectID = v; setModified(true); } // update associated TNotify if (collTNotifys != null) { for (int i = 0; i < collTNotifys.size(); i++) { ((TNotify) collTNotifys.get(i)).setProjectCategoryID(v); } } // update associated TWorkItem if (collTWorkItems != null) { for (int i = 0; i < collTWorkItems.size(); i++) { ((TWorkItem) collTWorkItems.get(i)).setProjectCategoryID(v); } } }