Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java')
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java
new file mode 100644
index 00000000000..fb3945e25fd
--- /dev/null
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ValueHolder.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems and others.
+ * 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.tests.dsf;
+
+/**
+ * Utility class to hold a value retrieved in a runnable.
+ * Usage in a test is as follows:
+ * <pre>
+ * final ValueHolder<Integer> value = new ValueHolder<Integer>();
+ * fExecutor.execute(new Runnable() {
+ * public void run() {
+ * value.fValue = 1;
+ * }
+ * });
+ * Assert.assertTrue(value.fValue == 1);
+ * </pre>
+ */
+public class ValueHolder<V> {
+ public V fValue;
+}

Back to the top