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

hydra.ext.org.graphviz.dot.NodeId Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
// Note: this is an automatically generated file. Do not edit.

package hydra.ext.org.graphviz.dot;

import java.io.Serializable;

public class NodeId implements Serializable {
  public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/graphviz/dot.NodeId");
  
  public static final hydra.core.Name FIELD_NAME_ID = new hydra.core.Name("id");
  
  public static final hydra.core.Name FIELD_NAME_PORT = new hydra.core.Name("port");
  
  public final hydra.ext.org.graphviz.dot.Id id;
  
  public final hydra.util.Opt port;
  
  public NodeId (hydra.ext.org.graphviz.dot.Id id, hydra.util.Opt port) {
    java.util.Objects.requireNonNull((id));
    java.util.Objects.requireNonNull((port));
    this.id = id;
    this.port = port;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof NodeId)) {
      return false;
    }
    NodeId o = (NodeId) (other);
    return id.equals(o.id) && port.equals(o.port);
  }
  
  @Override
  public int hashCode() {
    return 2 * id.hashCode() + 3 * port.hashCode();
  }
  
  public NodeId withId(hydra.ext.org.graphviz.dot.Id id) {
    java.util.Objects.requireNonNull((id));
    return new NodeId(id, port);
  }
  
  public NodeId withPort(hydra.util.Opt port) {
    java.util.Objects.requireNonNull((port));
    return new NodeId(id, port);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy