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

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

Introduction

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

Prototype

public EqualsBuilder() 

Source Link

Document

Constructor for EqualsBuilder.

Starts off assuming that equals is true.

Usage

From source file:beans.CourseConflict.java

public boolean equals(Object o) {
    if (this == o) {
        return true;
    } else if (o instanceof CourseConflict) {
        CourseConflict other = (CourseConflict) o;
        return new EqualsBuilder().append(leftCourse, other.leftCourse).append(rightCourse, other.rightCourse)
                .isEquals();/*from   www. ja  v  a 2 s.co  m*/
    } else {
        return false;
    }
}

From source file:buildcraft.core.StackAtPosition.java

@Override
public boolean equals(Object o) {
    if (o == null)
        return false;
    if (o.getClass() != getClass())
        return false;
    StackAtPosition other = (StackAtPosition) o;
    return new EqualsBuilder().append(stack, other.stack).append(pos, other.pos).append(display, other.display)
            .isEquals();/*w  ww. j  a  va  2 s .c  o  m*/
}

From source file:io.fourfinanceit.homework.model.LoanApplication.java

@Override
public boolean equals(Object o) {

    if (null == o)
        return false;
    if (!(o instanceof LoanApplication))
        return false;
    if (this == o)
        return true;

    LoanApplication input = (LoanApplication) o;
    return new EqualsBuilder().append(this.getLoanApplicationId(), input.getLoanApplicationId()).isEquals();

}

From source file:de.mg.stock.server.model.SimpleDayPrice.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;
    SimpleDayPrice that = (SimpleDayPrice) o;
    return new EqualsBuilder().append(average, that.average).append(date, that.date).isEquals();
}

From source file:com.orange.clara.cloud.services.sandbox.domain.UserInfo.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;

    if (o == null || getClass() != o.getClass())
        return false;

    UserInfo userInfo = (UserInfo) o;//ww  w . ja  v  a 2 s . co m

    return new EqualsBuilder().append(username, userInfo.username).append(userId, userInfo.userId).isEquals();
}

From source file:entities.Proveedores.java

public boolean equals(Object obj) {
    if (obj == null)
        return false;
    if (!(obj instanceof Proveedores))
        return false;
    Proveedores prov = (Proveedores) obj;

    return new EqualsBuilder().append(this.nombre, prov.nombre).append(this.id, prov.id)
            .append(this.direccion, prov.direccion).append(this.telefono, prov.telefono).isEquals();
}

From source file:com.hp.ov.sdk.dto.rack.PowerSupply.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;

    if (o instanceof PowerSupply) {
        PowerSupply that = (PowerSupply) o;

        return new EqualsBuilder().append(id, that.id).append(side, that.side).isEquals();
    }//w  w w .  j  a v a2 s  . com
    return false;
}

From source file:de.blizzy.documentr.repository.LockKey.java

@Override
public boolean equals(Object o) {
    if (o == this) {
        return true;
    } else if ((o != null) && o.getClass().equals(getClass())) {
        LockKey other = (LockKey) o;//  w  w w  . j  av a2 s  .  c o m
        return new EqualsBuilder().append(projectName, other.projectName).append(branchName, other.branchName)
                .append(central, other.central).isEquals();
    }
    return false;
}

From source file:ch.aonyx.broker.ib.api.StringId.java

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }//from  w  w w. j  av a 2  s .c om
    if (obj == this) {
        return true;
    }
    if (obj.getClass() != getClass()) {
        return false;
    }
    final StringId rhs = (StringId) obj;
    return new EqualsBuilder().append(id, rhs.id).isEquals();
}

From source file:com.timrcoulson.gymbro.entity.Session.java

@Override
public boolean equals(Object obj) {
    if (obj == null)
        return false;
    if (!(obj instanceof Session))
        return false;
    Session session = (Session) obj;//  w  w w . j av  a 2 s.  c  o m
    if (!(new EqualsBuilder().append(name, session.name).append(order, session.order).isEquals()))
        return false;
    if (!(session.getExercises().size() == this.getExercises().size()))
        return false;
    Iterator<? extends Exercise> exerciseIterator = session.getExercises().iterator();
    for (Exercise exercise : this.getExercises()) {
        if (!exerciseIterator.next().equals(exercise))
            return false;
    }
    return true;
}