Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 import  org.apache.commons.lang3.builder.EqualsBuilder;
 import  org.apache.commons.lang3.builder.HashCodeBuilder;
 
 public class CEBE_EqualsToEqualsSample {
     public final String name;
     public final int age;
 
     CEBE_EqualsToEqualsSample(String nameint age) {
         this. = name;
        this. = age;
    }
    @Override
    public int hashCode() {
        return new HashCodeBuilder().append().append().toHashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        CEBE_EqualsToEqualsSample other = (CEBE_EqualsToEqualsSampleobj;
        return new EqualsBuilder().append(this.other.name).append(this.other.age).equals(obj);
    }
New to GrepCode? Check out our FAQ X