Created
May 23, 2018 11:28
-
-
Save bdarfler/b6412e3e204660363596743043bf76bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.lang.builder.EqualsBuilder; | |
import org.apache.commons.lang.builder.HashCodeBuilder; | |
import org.apache.commons.lang.builder.ReflectionToStringBuilder; | |
import org.apache.commons.lang.builder.ToStringStyle; | |
public abstract class AbstractBaseObj { | |
@Override | |
public boolean equals( final Object obj ) { | |
return EqualsBuilder.reflectionEquals( this, obj ); | |
} | |
@Override | |
public int hashCode() { | |
return HashCodeBuilder.reflectionHashCode( this ); | |
} | |
@Override | |
public String toString() { | |
return new ReflectionToStringBuilder( this).toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment