/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ @Override public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }
/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }
/** * The <code>SimplePropertyDescriptor</code> implementation of this * <code>IPropertyDescriptor</code> method returns true if the other * property has the same id and category and <code>getAlwaysIncompatible()</code> * returns false */ @Override public boolean isCompatibleWith(IPropertyDescriptor anotherProperty) { if (getAlwaysIncompatible()) { return false; } // Compare id Object id1 = getId(); Object id2 = anotherProperty.getId(); if (!id1.equals(id2)) { return false; } // Compare Category (may be null) if (getCategory() == null) { if (anotherProperty.getCategory() != null) { return false; } } else { if (!getCategory().equals(anotherProperty.getCategory())) { return false; } } return true; }