X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.utils%2Fsrc%2Forg%2Fsimantics%2Futils%2FExtendableDataContainer.java;h=281788fedfffb1d2ecb1b4264b2680e2befe3356;hb=3a1169e5b601f99d66cadaf398329fde9cc8e14a;hp=8765088f0777105e9ee1e254db17bbcbfda8eb2c;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.utils/src/org/simantics/utils/ExtendableDataContainer.java b/bundles/org.simantics.utils/src/org/simantics/utils/ExtendableDataContainer.java index 8765088f0..281788fed 100644 --- a/bundles/org.simantics.utils/src/org/simantics/utils/ExtendableDataContainer.java +++ b/bundles/org.simantics.utils/src/org/simantics/utils/ExtendableDataContainer.java @@ -1,64 +1,64 @@ -/******************************************************************************* - * 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 { - - 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 getIntegerContainer() { - return new ExtendableDataContainer(); - } - - public static ExtendableDataContainer getDoubleContainer() { - return new ExtendableDataContainer(); - } - - public static ExtendableDataContainer getStringContainer() { - return new ExtendableDataContainer(); - } - -} +/******************************************************************************* + * 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 { + + 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 getIntegerContainer() { + return new ExtendableDataContainer(); + } + + public static ExtendableDataContainer getDoubleContainer() { + return new ExtendableDataContainer(); + } + + public static ExtendableDataContainer getStringContainer() { + return new ExtendableDataContainer(); + } + +}