1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
13 * Created on 16.12.2005
16 package org.simantics.utils;
20 * DataContainer is used as return argument
23 * @author Toni Kalajainen
25 public class ExtendableDataContainer<T> {
29 public ExtendableDataContainer() {
32 public ExtendableDataContainer(T initialData) {
33 this.data = initialData;
36 public boolean isEmpty() {
40 public void set(T value) {
48 public boolean hasContent() {
52 public static ExtendableDataContainer<Integer> getIntegerContainer() {
53 return new ExtendableDataContainer<Integer>();
56 public static ExtendableDataContainer<Double> getDoubleContainer() {
57 return new ExtendableDataContainer<Double>();
60 public static ExtendableDataContainer<String> getStringContainer() {
61 return new ExtendableDataContainer<String>();