All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.equalst Maven / Gradle / Ivy

Go to download

JavaForger can create source code from templates using existing java classes as input.

There is a newer version: 2.0.1
Show newest version
import org.apache.commons.lang3.builder.EqualsBuilder;

  @Override
  public boolean equals(Object obj) {
    boolean equals = false;
    if (this == obj) {
      equals = true;
    } else if (obj != null && getClass() == obj.getClass()) {
      ${mergeClassName} other = (${mergeClassName}) obj;
      equals = new EqualsBuilder()
<#if class.extend??>      
        .appendSuper(super.equals(obj))
  
<#list fields as field>
        .append(${field.name}, other.${field.name})

        .isEquals();
      }
      return equals;
    }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy