Example usage for org.apache.commons.lang3.builder EqualsBuilder append

List of usage examples for org.apache.commons.lang3.builder EqualsBuilder append

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder EqualsBuilder append.

Prototype

public EqualsBuilder append(final boolean[] lhs, final boolean[] rhs) 

Source Link

Document

Deep comparison of array of boolean.

Usage

From source file:org.kalypso.zml.ui.table.dialogs.input.ZmlEinzelwertHelper.java

public static boolean compareDayAnchor(final Date d1, final Date d2) {
    if (d1 == null || d2 == null) {
        return false;
    }//from   ww  w  .ja  va2 s  .co  m

    final Calendar c1 = Calendar.getInstance(KalypsoCorePlugin.getDefault().getTimeZone());
    c1.setTime(d1);

    final Calendar c2 = Calendar.getInstance(KalypsoCorePlugin.getDefault().getTimeZone());
    c2.setTime(d2);

    final EqualsBuilder builder = new EqualsBuilder();
    builder.append(c1.get(Calendar.DAY_OF_MONTH), c2.get(Calendar.DAY_OF_MONTH));
    builder.append(c1.get(Calendar.MONTH), c2.get(Calendar.MONTH));
    builder.append(c1.get(Calendar.YEAR), c2.get(Calendar.YEAR));

    return builder.isEquals();
}

From source file:org.kisoonlineapp.security.event.UserEvent.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }/*from  w  ww . j  a  va2  s.  c  o m*/
    if (!(obj instanceof UserEvent)) {
        return false;
    }
    final UserEvent other = (UserEvent) obj;
    EqualsBuilder eb = new EqualsBuilder();
    eb.append(this.userEventType, other.userEventType);
    Boolean equals = eb.build();
    return equals;
}

From source file:org.kisoonlineapp.uc.event.UcKisoonlineAppEvent.java

@Override
public boolean equals(Object obj) {
    if (obj == null) {
        return false;
    }//  www.j  a  va  2s .  c  o m
    if (!(obj instanceof UcKisoonlineAppEvent)) {
        return false;
    }
    final UcKisoonlineAppEvent other = (UcKisoonlineAppEvent) obj;
    final EqualsBuilder eb = new EqualsBuilder();
    eb.append(this.ucKisoonlineAppEventType, other.ucKisoonlineAppEventType);
    final Boolean equals = eb.build();
    return equals;
}

From source file:org.knime.semanticweb.services.impl.SPARQLEndpointService.java

/**
 * {@inheritDoc}/*w  w  w  .  j a v a2  s.c  o m*/
 */
@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof SPARQLEndpointService)) {
        return false;
    }
    final SPARQLEndpointService con = (SPARQLEndpointService) obj;
    final EqualsBuilder eb = new EqualsBuilder();
    eb.append(m_endpoint, con.m_endpoint);
    eb.append(m_username, con.m_username);
    eb.append(m_password, con.m_password);
    eb.append(m_credential, con.m_credential);
    return eb.isEquals();
}

From source file:org.lenskit.eval.crossfold.UserPartitionCrossfoldMethod.java

@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    } else if (obj instanceof UserPartitionCrossfoldMethod) {
        UserPartitionCrossfoldMethod om = (UserPartitionCrossfoldMethod) obj;
        EqualsBuilder eqb = new EqualsBuilder();
        return eqb.append(order, om.order).append(partition, om.partition).isEquals();
    } else {/*from  ww  w  . j  a  v  a 2 s  . c o m*/
        return false;
    }
}

From source file:org.lenskit.eval.crossfold.UserSampleCrossfoldMethod.java

@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    } else if (obj instanceof UserSampleCrossfoldMethod) {
        UserSampleCrossfoldMethod om = (UserSampleCrossfoldMethod) obj;
        EqualsBuilder eqb = new EqualsBuilder();
        return eqb.append(order, om.order).append(partition, om.partition).append(sampleSize, om.sampleSize)
                .isEquals();//from w  ww. j  a  v  a  2  s  . c o m
    } else {
        return false;
    }
}

From source file:org.openl.rules.calculation.result.convertor2.SpreadsheetResultPoint.java

@Override
public boolean equals(Object obj) {
    EqualsBuilder builder = new EqualsBuilder();
    if (!(obj instanceof SpreadsheetResultPoint)) {
        return false;
    }//from w w w.  ja  va2  s  .  c o m
    SpreadsheetResultPoint another = (SpreadsheetResultPoint) obj;
    builder.append(another.columnIndex, columnIndex);
    builder.append(another.rowIndex, rowIndex);

    return builder.isEquals();
}

From source file:org.pac4j.http.credentials.TokenCredentials.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;

    TokenCredentials that = (TokenCredentials) o;
    final EqualsBuilder builder = new EqualsBuilder();
    return builder.append(this.token, that.token).isEquals();
}

From source file:org.pac4j.http.credentials.UsernamePasswordCredentials.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;

    UsernamePasswordCredentials that = (UsernamePasswordCredentials) o;
    final EqualsBuilder builder = new EqualsBuilder();
    return builder.append(this.username, that.username).append(this.password, that.password).isEquals();
}

From source file:org.ruogu.lang3.builder.Person.java

public boolean equals2(Object obj) {
    if (obj == null) {
        return false;
    }/*w  w  w . j a  v  a 2s  .  c  o  m*/
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    Person p = (Person) obj;
    System.out.println("...");
    System.out.println("super.equals(obj):" + super.equals(obj));
    EqualsBuilder eb = new EqualsBuilder();
    System.out.println("eb:" + eb.isEquals());
    return eb.append(this.name, p.name).append(this.age, p.age).append(this.smoker, p.smoker).isEquals();
}