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

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

package hydra.langs.java.syntax;

import java.io.Serializable;

public class WhileStatementNoShortIf implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.WhileStatementNoShortIf");
  
  public final java.util.Optional cond;
  
  public final hydra.langs.java.syntax.StatementNoShortIf body;
  
  public WhileStatementNoShortIf (java.util.Optional cond, hydra.langs.java.syntax.StatementNoShortIf body) {
    this.cond = cond;
    this.body = body;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof WhileStatementNoShortIf)) {
      return false;
    }
    WhileStatementNoShortIf o = (WhileStatementNoShortIf) (other);
    return cond.equals(o.cond) && body.equals(o.body);
  }
  
  @Override
  public int hashCode() {
    return 2 * cond.hashCode() + 3 * body.hashCode();
  }
  
  public WhileStatementNoShortIf withCond(java.util.Optional cond) {
    return new WhileStatementNoShortIf(cond, body);
  }
  
  public WhileStatementNoShortIf withBody(hydra.langs.java.syntax.StatementNoShortIf body) {
    return new WhileStatementNoShortIf(cond, body);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy