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

hydra.langs.java.syntax.ReceiverParameter Maven / Gradle / Ivy

package hydra.langs.java.syntax;

import java.io.Serializable;

public class ReceiverParameter implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.ReceiverParameter");
  
  public final java.util.List annotations;
  
  public final hydra.langs.java.syntax.UnannType unannType;
  
  public final java.util.Optional identifier;
  
  public ReceiverParameter (java.util.List annotations, hydra.langs.java.syntax.UnannType unannType, java.util.Optional identifier) {
    this.annotations = annotations;
    this.unannType = unannType;
    this.identifier = identifier;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof ReceiverParameter)) {
      return false;
    }
    ReceiverParameter o = (ReceiverParameter) (other);
    return annotations.equals(o.annotations) && unannType.equals(o.unannType) && identifier.equals(o.identifier);
  }
  
  @Override
  public int hashCode() {
    return 2 * annotations.hashCode() + 3 * unannType.hashCode() + 5 * identifier.hashCode();
  }
  
  public ReceiverParameter withAnnotations(java.util.List annotations) {
    return new ReceiverParameter(annotations, unannType, identifier);
  }
  
  public ReceiverParameter withUnannType(hydra.langs.java.syntax.UnannType unannType) {
    return new ReceiverParameter(annotations, unannType, identifier);
  }
  
  public ReceiverParameter withIdentifier(java.util.Optional identifier) {
    return new ReceiverParameter(annotations, unannType, identifier);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy