1 package org.simantics.db.layer0.variable;
3 public class VariableNode<Node> {
4 public final NodeSupport<Node> support;
5 public final Object node;
7 public VariableNode(NodeSupport<Node> support, Object node) {
8 assert(support != null);
9 this.support = support;
13 private int computeHash() {
14 return 31*support.hashCode() + 41*node.hashCode();
18 public int hashCode() {
25 public boolean equals(Object object) {
28 else if (object == null)
30 else if (!(object instanceof VariableNode))
32 VariableNode<?> r = (VariableNode<?>)object;
33 if (r.hashCode() != hashCode())
35 return r.support.equals(support) && r.node.equals(node);