X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics%2Fsrc%2Forg%2Fsimantics%2FObjectIdentitySchedulingRule.java;h=9902dd0a9f36b323592e32bb827259909614af7d;hb=b913419ca9037bf9734c56a5f079024c3a1cd177;hp=a455d4b4dd95db03d3e6ae94ea53a00c880c3256;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics/src/org/simantics/ObjectIdentitySchedulingRule.java b/bundles/org.simantics/src/org/simantics/ObjectIdentitySchedulingRule.java index a455d4b4d..9902dd0a9 100644 --- a/bundles/org.simantics/src/org/simantics/ObjectIdentitySchedulingRule.java +++ b/bundles/org.simantics/src/org/simantics/ObjectIdentitySchedulingRule.java @@ -1,39 +1,39 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 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; - -import org.eclipse.core.runtime.jobs.ISchedulingRule; - -/** - * @author Tuukka Lehtonen - */ -public class ObjectIdentitySchedulingRule implements ISchedulingRule { - - private final Object object; - - public ObjectIdentitySchedulingRule(Object object) { - if (object == null) - throw new NullPointerException("null object"); - this.object = object; - } - - public boolean contains(ISchedulingRule rule) { - if (rule instanceof ObjectIdentitySchedulingRule) - return object.equals(((ObjectIdentitySchedulingRule) rule).object); - return false; - } - - public boolean isConflicting(ISchedulingRule rule) { - return contains(rule); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 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; + +import org.eclipse.core.runtime.jobs.ISchedulingRule; + +/** + * @author Tuukka Lehtonen + */ +public class ObjectIdentitySchedulingRule implements ISchedulingRule { + + private final Object object; + + public ObjectIdentitySchedulingRule(Object object) { + if (object == null) + throw new NullPointerException("null object"); + this.object = object; + } + + public boolean contains(ISchedulingRule rule) { + if (rule instanceof ObjectIdentitySchedulingRule) + return object.equals(((ObjectIdentitySchedulingRule) rule).object); + return false; + } + + public boolean isConflicting(ISchedulingRule rule) { + return contains(rule); + } + +}