X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.mapping%2Fsrc%2Forg%2Fsimantics%2Fmapping%2Fconstraint%2FExistsConstraint.java;h=c77c7f5bc022ed22277acb3f05dbb514d56de748;hp=a5e7238dfd2f19febee6b698216df32b55745ee1;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.mapping/src/org/simantics/mapping/constraint/ExistsConstraint.java b/bundles/org.simantics.mapping/src/org/simantics/mapping/constraint/ExistsConstraint.java index a5e7238df..c77c7f5bc 100644 --- a/bundles/org.simantics.mapping/src/org/simantics/mapping/constraint/ExistsConstraint.java +++ b/bundles/org.simantics.mapping/src/org/simantics/mapping/constraint/ExistsConstraint.java @@ -1,52 +1,52 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.mapping.constraint; - -import gnu.trove.map.hash.TObjectIntHashMap; - -import java.util.Arrays; - -import org.simantics.db.Resource; -import org.simantics.mapping.constraint.instructions.IInstruction; -import org.simantics.utils.datastructures.persistent.ImmutableSet; - -public class ExistsConstraint implements IConstraint { - - IConstraint constraint; - Resource[] variables; - - public ExistsConstraint(IConstraint constraint, Resource[] variables) { - this.constraint = constraint; - this.variables = Arrays.copyOf(variables, variables.length); - } - - @Override - public ImmutableSet binds() { - return constraint.binds(); - } - - @Override - public IInstruction createInstruction( - TObjectIntHashMap variableIds, - ImmutableSet bound) - throws TooManyUnboundVariablesException { - // TODO Auto-generated method stub - return null; - } - - @Override - public int isApplicable(ImmutableSet bound) { - // TODO Auto-generated method stub - return 0; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.mapping.constraint; + +import gnu.trove.map.hash.TObjectIntHashMap; + +import java.util.Arrays; + +import org.simantics.db.Resource; +import org.simantics.mapping.constraint.instructions.IInstruction; +import org.simantics.utils.datastructures.persistent.ImmutableSet; + +public class ExistsConstraint implements IConstraint { + + IConstraint constraint; + Resource[] variables; + + public ExistsConstraint(IConstraint constraint, Resource[] variables) { + this.constraint = constraint; + this.variables = Arrays.copyOf(variables, variables.length); + } + + @Override + public ImmutableSet binds() { + return constraint.binds(); + } + + @Override + public IInstruction createInstruction( + TObjectIntHashMap variableIds, + ImmutableSet bound) + throws TooManyUnboundVariablesException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int isApplicable(ImmutableSet bound) { + // TODO Auto-generated method stub + return 0; + } + +}