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

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

package hydra.langs.java.syntax;

import java.io.Serializable;

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy