List of usage examples for org.apache.commons.lang3.builder EqualsBuilder append
public EqualsBuilder append(final boolean[] lhs, final boolean[] rhs)
Deep comparison of array of boolean
.
From source file:org.xwiki.notifications.preferences.internal.AbstractNotificationPreference.java
@Override public boolean equals(Object o) { if (this == o) { return true; }//from w w w .j a va2s . com if (o == null) { return false; } // Here, we only compute a subset of the properties, because we want to say equals() == true if the other // preference is about the same event type, etc... // See: // org.xwiki.notifications.preferences.script.NotificationPreferenceScriptService.getCorrespondingPreference() // and: // DefaultNotificationPreferenceManager.getAllPreferences(org.xwiki.model.reference.DocumentReference) // to be sure you don't break anything by changing this method. AbstractNotificationPreference that = (AbstractNotificationPreference) o; EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder.append(that.format, format); equalsBuilder.append(that.properties, properties); return equalsBuilder.isEquals(); }
From source file:org.xwiki.rendering.block.HeaderBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/*www .ja v a 2s.c om*/ if (obj instanceof HeaderBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getLevel(), ((HeaderBlock) obj).getLevel()); builder.append(getId(), ((HeaderBlock) obj).getId()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.IdBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/*from ww w . ja v a2 s .co m*/ if (obj instanceof IdBlock) { EqualsBuilder builder = new EqualsBuilder(); builder.appendSuper(super.equals(obj)); builder.append(getName(), ((IdBlock) obj).getName()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.ImageBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/* www . j a v a 2 s . c o m*/ if (obj instanceof ImageBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getReference(), ((ImageBlock) obj).getReference()); builder.append(isFreeStandingURI(), ((ImageBlock) obj).isFreeStandingURI()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.LinkBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }//from w ww . j a v a 2 s . c o m if (obj instanceof LinkBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getReference(), ((LinkBlock) obj).getReference()); builder.append(isFreeStandingURI(), ((LinkBlock) obj).isFreeStandingURI()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.MacroBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/*from w w w .ja va2s . c o m*/ if (obj instanceof MacroBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getContent(), ((MacroBlock) obj).getContent()); builder.append(getId(), ((MacroBlock) obj).getId()); builder.append(isInline(), ((MacroBlock) obj).isInline()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.MacroMarkerBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }//from w w w .j a v a 2 s . c om if (obj instanceof MacroMarkerBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getContent(), ((MacroMarkerBlock) obj).getContent()); builder.append(getId(), ((MacroMarkerBlock) obj).getId()); builder.append(isInline(), ((MacroMarkerBlock) obj).isInline()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.MetaDataBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }//from w w w . j a v a2s .c om if (obj instanceof MetaDataBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getMetaData(), ((MetaDataBlock) obj).getMetaData()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.RawBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }/*from w ww . j av a2 s .com*/ if (obj instanceof RawBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(getRawContent(), ((RawBlock) obj).getRawContent()); builder.append(getSyntax(), ((RawBlock) obj).getSyntax()); return builder.isEquals(); } return false; }
From source file:org.xwiki.rendering.block.VerbatimBlock.java
@Override public boolean equals(Object obj) { if (obj == this) { return true; }//from ww w . jav a 2s. c om if (obj instanceof VerbatimBlock && super.equals(obj)) { EqualsBuilder builder = new EqualsBuilder(); builder.append(isInline(), ((VerbatimBlock) obj).isInline()); builder.append(getProtectedString(), ((VerbatimBlock) obj).getProtectedString()); return builder.isEquals(); } return false; }