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

hydra.langs.sql.ansi.FromConstructor Maven / Gradle / Ivy

package hydra.langs.sql.ansi;

import java.io.Serializable;

public class FromConstructor implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/sql/ansi.FromConstructor");
  
  public final java.util.Optional columns;
  
  public final java.util.Optional override;
  
  public final hydra.langs.sql.ansi.ContextuallyTypedTableValueConstructor values;
  
  public FromConstructor (java.util.Optional columns, java.util.Optional override, hydra.langs.sql.ansi.ContextuallyTypedTableValueConstructor values) {
    this.columns = columns;
    this.override = override;
    this.values = values;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof FromConstructor)) {
      return false;
    }
    FromConstructor o = (FromConstructor) (other);
    return columns.equals(o.columns) && override.equals(o.override) && values.equals(o.values);
  }
  
  @Override
  public int hashCode() {
    return 2 * columns.hashCode() + 3 * override.hashCode() + 5 * values.hashCode();
  }
  
  public FromConstructor withColumns(java.util.Optional columns) {
    return new FromConstructor(columns, override, values);
  }
  
  public FromConstructor withOverride(java.util.Optional override) {
    return new FromConstructor(columns, override, values);
  }
  
  public FromConstructor withValues(hydra.langs.sql.ansi.ContextuallyTypedTableValueConstructor values) {
    return new FromConstructor(columns, override, values);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy