X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fstore%2FIdRes.java;h=ad442151cdb54fdfc820d3a5f668d074310e7810;hb=HEAD;hp=4c099d1428923a8c38df38afb268f88711a07223;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/store/IdRes.java b/bundles/org.simantics.graph/src/org/simantics/graph/store/IdRes.java index 4c099d142..ad442151c 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/store/IdRes.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/store/IdRes.java @@ -1,39 +1,39 @@ -package org.simantics.graph.store; - -import org.simantics.graph.query.Res; - -/** - * A resource that exists only in one graph fragment. The resource - * is represented as a integer identifier. - * @author Hannu Niemistö - */ -public class IdRes implements Res { - public final GraphStore fragment; - public final int id; - - public IdRes(GraphStore fragment, int id) { - this.fragment = fragment; - this.id = id; - } - - @Override - public int hashCode() { - return id * 31 + fragment.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null || getClass() != obj.getClass()) - return false; - IdRes other = (IdRes) obj; - return fragment == other.fragment && id == other.id; - } - - @Override - public String toString() { - return "#" + id; - } - -} +package org.simantics.graph.store; + +import org.simantics.graph.query.Res; + +/** + * A resource that exists only in one graph fragment. The resource + * is represented as a integer identifier. + * @author Hannu Niemistö + */ +public class IdRes implements Res { + public final GraphStore fragment; + public final int id; + + public IdRes(GraphStore fragment, int id) { + this.fragment = fragment; + this.id = id; + } + + @Override + public int hashCode() { + return id * 31 + fragment.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + IdRes other = (IdRes) obj; + return fragment == other.fragment && id == other.id; + } + + @Override + public String toString() { + return "#" + id; + } + +}