Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/JavaQuery.java')
-rw-r--r--plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/JavaQuery.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/JavaQuery.java b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/JavaQuery.java
new file mode 100644
index 00000000000..9e3d08b8486
--- /dev/null
+++ b/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints/src/org/eclipse/papyrus/infra/constraints/constraints/JavaQuery.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.constraints.constraints;
+
+/**
+ * Represents a Java Query
+ */
+public interface JavaQuery {
+
+ /**
+ * Tests whether the query matches a given object
+ *
+ * @param selection
+ * @return
+ */
+ public boolean match(Object selection);
+
+ /**
+ * A Java query which is always false
+ *
+ * @author Camille Letavernier
+ *
+ */
+ public class FalseQuery implements JavaQuery {
+
+ public boolean match(Object selection) {
+ return false;
+ }
+ }
+}

Back to the top