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.grouplens.grapht.reflect.internal.SimpleInjectionPoint.java
@Override public boolean equals(Object o) { if (!(o instanceof SimpleInjectionPoint)) { return false; }// w w w . j a v a 2s . c om SimpleInjectionPoint p = (SimpleInjectionPoint) o; EqualsBuilder eqb = new EqualsBuilder(); return eqb.append(type, p.type).append(qualifier, p.qualifier).append(nullable, p.nullable).isEquals(); }
From source file:org.grouplens.grapht.solver.BindRuleImpl.java
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof BindRuleImpl) { EqualsBuilder eq = new EqualsBuilder(); BindRuleImpl or = (BindRuleImpl) o; return eq.append(depType, or.depType).append(implType, or.implType).append(flags, or.flags) .append(qualifier, or.qualifier).append(policy, or.policy).append(satisfaction, or.satisfaction) .isEquals();/*from ww w . j a v a2 s. c o m*/ } else { return false; } }
From source file:org.grouplens.lenskit.data.pref.PreferenceDomain.java
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof PreferenceDomain) { PreferenceDomain od = (PreferenceDomain) o; EqualsBuilder eqb = new EqualsBuilder(); eqb.append(minimum, od.getMinimum()); eqb.append(maximum, od.getMaximum()); eqb.append(hasPrecision(), od.hasPrecision()); if (eqb.isEquals() && hasPrecision() && od.hasPrecision()) { eqb.append(precision, od.getPrecision()); }/*from www . j av a 2 s . co m*/ return eqb.isEquals(); } else { return false; } }
From source file:org.grouplens.lenskit.data.pref.Preferences.java
/** * Compare two preferences for equality. Used to implement {@link #equals(Object)} in preference * implementations./*from ww w .ja va 2 s . c o m*/ * @param p1 The first preference. * @param p2 The second preference. * @return Whether the two preferences are equal. */ public static boolean equals(Preference p1, Preference p2) { if (p1 == p2) { return true; } else if (p1 == null || p2 == null) { return false; } EqualsBuilder eqb = new EqualsBuilder(); return eqb.append(p1.getUserId(), p2.getUserId()).append(p1.getItemId(), p2.getItemId()) .append(p1.getValue(), p2.getValue()).isEquals(); }
From source file:org.grouplens.lenskit.eval.ExecutionInfo.java
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof ExecutionInfo) { ExecutionInfo eo = (ExecutionInfo) o; EqualsBuilder eqb = new EqualsBuilder(); return eqb.append(algoName, eo.algoName).append(algoAttributes, eo.algoAttributes) .append(dataSet, eo.dataSet).isEquals(); } else {//from w w w.j a v a 2s .c om return false; } }
From source file:org.jasig.cas.authentication.BasicCredentialMetaData.java
@Override public boolean equals(final Object other) { if (!(other instanceof BasicCredentialMetaData)) { return false; }// w ww .ja va 2 s. c om final BasicCredentialMetaData md = (BasicCredentialMetaData) other; final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.id, md.id); builder.append(this.credentialClass, md.credentialClass); return builder.isEquals(); }
From source file:org.jasig.cas.authentication.DefaultHandlerResult.java
@Override public boolean equals(final Object obj) { if (!(obj instanceof DefaultHandlerResult)) { return false; }/* ww w. ja va2 s .c om*/ if (obj == this) { return true; } final DefaultHandlerResult other = (DefaultHandlerResult) obj; final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.handlerName, other.handlerName); builder.append(this.credentialMetaData, other.credentialMetaData); builder.append(this.principal, other.principal); builder.append(this.warnings, other.warnings); return builder.isEquals(); }
From source file:org.jasig.cas.authentication.HandlerResult.java
@Override public boolean equals(final Object obj) { if (!(obj instanceof HandlerResult)) { return false; }/*from w w w . j a v a 2 s.c o m*/ if (obj == this) { return true; } final HandlerResult other = (HandlerResult) obj; final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.handlerName, other.handlerName); builder.append(this.credentialMetaData, other.credentialMetaData); builder.append(this.principal, other.principal); builder.append(this.warnings, other.warnings); return builder.isEquals(); }
From source file:org.jasig.cas.authentication.ImmutableAuthentication.java
@Override public boolean equals(final Object obj) { if (!(obj instanceof Authentication)) { return false; }// w w w . ja v a 2s.c o m if (obj == this) { return true; } final Authentication other = (Authentication) obj; final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.principal, other.getPrincipal()); builder.append(this.credentials, other.getCredentials()); builder.append(this.successes, other.getSuccesses()); builder.append(this.authenticationDate, other.getAuthenticationDate().getTime()); builder.append(wrap(this.attributes), other.getAttributes()); builder.append(wrap(this.failures), other.getFailures()); return builder.isEquals(); }
From source file:org.jasig.cas.authentication.principal.CachingPrincipalAttributesRepository.java
@Override public boolean equals(final Object obj) { if (obj == null) { return false; }//from w w w . j ava 2s .c o m if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } final CachingPrincipalAttributesRepository rhs = (CachingPrincipalAttributesRepository) obj; final EqualsBuilder builder = new EqualsBuilder(); return builder.append(this.duration, rhs.duration).isEquals(); }