X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FResourceX.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FResourceX.java;h=7f0c8a9480ffa4ed72ae6395113c8975f592b735;hb=545538ee3a2353eee994042800e6e5393177f858;hp=0000000000000000000000000000000000000000;hpb=5b0c7af1c0845daa63a2ab7600a460a6573c6a56;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ResourceX.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ResourceX.java new file mode 100644 index 000000000..7f0c8a948 --- /dev/null +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ResourceX.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2019 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.db.layer0.variable; + +import org.simantics.db.Resource; + +public class ResourceX implements VariableOrResource { + + public final Resource value; + + public ResourceX(Resource value) { + this.value = value; + } + + @Override + public String toString() { + return "ResourceX " + value; + } + + @Override + public boolean equals(Object obj) { + if(this == obj) + return true; + if(obj == null || obj.getClass() != getClass()) + return false; + ResourceX other = (ResourceX)obj; + return value == null ? other.value == null : value.equals(other.value); + } + + @Override + public int hashCode() { + return 31 * (value == null ? 0 : value.hashCode()) + 13532; + } + +}