X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.utils%2Fsrc%2Forg%2Fsimantics%2Futils%2FRunnableWithObject.java;h=2aa16a65c76a32ee9cb2de8b09c858c425bc1c0c;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=3c00b219ca6fbd8656e7b609d88c3347994b86f6;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.utils/src/org/simantics/utils/RunnableWithObject.java b/bundles/org.simantics.utils/src/org/simantics/utils/RunnableWithObject.java index 3c00b219c..2aa16a65c 100644 --- a/bundles/org.simantics.utils/src/org/simantics/utils/RunnableWithObject.java +++ b/bundles/org.simantics.utils/src/org/simantics/utils/RunnableWithObject.java @@ -1,61 +1,61 @@ -/******************************************************************************* - * 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 - *******************************************************************************/ -package org.simantics.utils; - -/** - * This class is intended to be used as anonymous - * inner class - * - * - * @author Toni Kalajainen - */ -public class RunnableWithObject implements Runnable { - - protected Object object, object2; - - protected Object objs[]; - - public RunnableWithObject(Object o) { - object = o; - objs = new Object[] {o}; - } - - public RunnableWithObject(Object o, Object o2) { - object = o; - object2 = o2; - objs = new Object[] {o, o2}; - } - - public RunnableWithObject(Object... objs) { - this.objs = objs; - if (objs.length>=1) - object = objs[0]; - if (objs.length>=2) - object2 = objs[1]; - } - - public void run() { - } - - public Object getObject() { - return object; - } - - public int count() { - return objs.length; - } - - public Object getObject(int index) { - return objs[index]; - } - -} +/******************************************************************************* + * 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 + *******************************************************************************/ +package org.simantics.utils; + +/** + * This class is intended to be used as anonymous + * inner class + * + * + * @author Toni Kalajainen + */ +public class RunnableWithObject implements Runnable { + + protected Object object, object2; + + protected Object objs[]; + + public RunnableWithObject(Object o) { + object = o; + objs = new Object[] {o}; + } + + public RunnableWithObject(Object o, Object o2) { + object = o; + object2 = o2; + objs = new Object[] {o, o2}; + } + + public RunnableWithObject(Object... objs) { + this.objs = objs; + if (objs.length>=1) + object = objs[0]; + if (objs.length>=2) + object2 = objs[1]; + } + + public void run() { + } + + public Object getObject() { + return object; + } + + public int count() { + return objs.length; + } + + public Object getObject(int index) { + return objs[index]; + } + +}