--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.utils.datastructures;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public final class Callables {\r
+\r
+ public static class Static<T> implements Callable<T> {\r
+\r
+ private final T t;\r
+\r
+ public static <T> Static<T> make(T t) {\r
+ return new Static<T>(t);\r
+ }\r
+\r
+ private Static(T t) {\r
+ this.t = t;\r
+ }\r
+\r
+ @Override\r
+ public T call() {\r
+ return t;\r
+ }\r
+\r
+ }\r
+\r
+ public static final Callable<Boolean> TRUE = Static.make(Boolean.TRUE);\r
+\r
+ public static final Callable<Boolean> FALSE = Static.make(Boolean.FALSE);\r
+\r
+}\r