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

com.regnosys.rosetta.translate.GeneratedNameAndSource Maven / Gradle / Ivy

There is a newer version: 11.25.1
Show newest version
package com.regnosys.rosetta.translate;

import org.eclipse.xtend.lib.annotations.Data;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

@Data
@SuppressWarnings("all")
public class GeneratedNameAndSource {
  private final String className;

  private final GenerationResult source;

  public GeneratedNameAndSource(final String className, final GenerationResult source) {
    super();
    this.className = className;
    this.source = source;
  }

  @Override
  @Pure
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((this.className== null) ? 0 : this.className.hashCode());
    return prime * result + ((this.source== null) ? 0 : this.source.hashCode());
  }

  @Override
  @Pure
  public boolean equals(final Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    GeneratedNameAndSource other = (GeneratedNameAndSource) obj;
    if (this.className == null) {
      if (other.className != null)
        return false;
    } else if (!this.className.equals(other.className))
      return false;
    if (this.source == null) {
      if (other.source != null)
        return false;
    } else if (!this.source.equals(other.source))
      return false;
    return true;
  }

  @Override
  @Pure
  public String toString() {
    ToStringBuilder b = new ToStringBuilder(this);
    b.add("className", this.className);
    b.add("source", this.source);
    return b.toString();
  }

  @Pure
  public String getClassName() {
    return this.className;
  }

  @Pure
  public GenerationResult getSource() {
    return this.source;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy