-/*******************************************************************************\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
-/*\r
- * Created on 16.12.2005\r
- * \r
- */\r
-package org.simantics.utils;\r
-\r
-\r
-/**\r
- * DataContainer is used as return argument\r
- * \r
- * \r
- * @author Toni Kalajainen \r
- */\r
-public class ExtendableDataContainer<T> {\r
-\r
- private T data;\r
- \r
- public ExtendableDataContainer() { \r
- }\r
- \r
- public ExtendableDataContainer(T initialData) {\r
- this.data = initialData;\r
- }\r
- \r
- public boolean isEmpty() {\r
- return data==null;\r
- }\r
- \r
- public void set(T value) {\r
- data = value;\r
- }\r
- \r
- public T get() {\r
- return data;\r
- }\r
- \r
- public boolean hasContent() {\r
- return data!=null;\r
- }\r
- \r
- public static ExtendableDataContainer<Integer> getIntegerContainer() {\r
- return new ExtendableDataContainer<Integer>();\r
- }\r
- \r
- public static ExtendableDataContainer<Double> getDoubleContainer() {\r
- return new ExtendableDataContainer<Double>();\r
- }\r
- \r
- public static ExtendableDataContainer<String> getStringContainer() {\r
- return new ExtendableDataContainer<String>();\r
- }\r
- \r
-}\r
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+/*
+ * Created on 16.12.2005
+ *
+ */
+package org.simantics.utils;
+
+
+/**
+ * DataContainer is used as return argument
+ *
+ *
+ * @author Toni Kalajainen
+ */
+public class ExtendableDataContainer<T> {
+
+ private T data;
+
+ public ExtendableDataContainer() {
+ }
+
+ public ExtendableDataContainer(T initialData) {
+ this.data = initialData;
+ }
+
+ public boolean isEmpty() {
+ return data==null;
+ }
+
+ public void set(T value) {
+ data = value;
+ }
+
+ public T get() {
+ return data;
+ }
+
+ public boolean hasContent() {
+ return data!=null;
+ }
+
+ public static ExtendableDataContainer<Integer> getIntegerContainer() {
+ return new ExtendableDataContainer<Integer>();
+ }
+
+ public static ExtendableDataContainer<Double> getDoubleContainer() {
+ return new ExtendableDataContainer<Double>();
+ }
+
+ public static ExtendableDataContainer<String> getStringContainer() {
+ return new ExtendableDataContainer<String>();
+ }
+
+}