X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Faccessor%2Fimpl%2FChangeSet.java;h=67bdca40ee8c351c8935a7cd6183c87b1218f6db;hb=refs%2Fchanges%2F38%2F238%2F2;hp=a99646f032cbcf0a7e8a19eca8b8f42006cd695a;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/impl/ChangeSet.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/impl/ChangeSet.java index a99646f03..67bdca40e 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/impl/ChangeSet.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/accessor/impl/ChangeSet.java @@ -1,24 +1,24 @@ -/******************************************************************************* - * Copyright (c) 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 - *******************************************************************************/ +/******************************************************************************* + * Copyright (c) 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.databoard.accessor.impl; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; - -import org.simantics.databoard.accessor.Accessor; -import org.simantics.databoard.accessor.event.Event; -import org.simantics.databoard.accessor.event.ModificationEvent; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +import org.simantics.databoard.accessor.Accessor; +import org.simantics.databoard.accessor.event.Event; +import org.simantics.databoard.accessor.event.ModificationEvent; /** * ChangeSet is a collection of a modification events. ChangeSet can be applied @@ -33,17 +33,17 @@ public class ChangeSet implements Accessor.Listener { public List events = new LinkedList(); - public synchronized void addEvent(Event event) { - if (event instanceof ModificationEvent == false) return; - this.events.add(event); - } - - public synchronized void addEvents(Collection events) { - for (Event e : events) { - if (e instanceof ModificationEvent == false) return; - this.events.addAll(events); - } - } + public synchronized void addEvent(Event event) { + if (event instanceof ModificationEvent == false) return; + this.events.add(event); + } + + public synchronized void addEvents(Collection events) { + for (Event e : events) { + if (e instanceof ModificationEvent == false) return; + this.events.addAll(events); + } + } /** * Returns events and clears change set.