ModelProviderEvent.java :  » IDE-Eclipse » pde » org » eclipse » pde » internal » core » Java Open Source

Java Open Source » IDE Eclipse » pde 
pde » org » eclipse » pde » internal » core » ModelProviderEvent.java
/*******************************************************************************
 *  Copyright (c) 2000, 2008 IBM Corporation and others.
 *  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:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.pde.internal.core;

import org.eclipse.pde.core.IModel;
import org.eclipse.pde.core.IModelProviderEvent;

public class ModelProviderEvent implements IModelProviderEvent {
  private int types;
  private Object source;
  private IModel[] added;
  private IModel[] removed;
  private IModel[] changed;

  public ModelProviderEvent(Object source, int types, IModel[] added, IModel[] removed, IModel[] changed) {
    this.source = source;
    this.types = types;
    this.added = added;
    this.removed = removed;
    this.changed = changed;
  }

  public IModel[] getAddedModels() {
    return (added == null) ? new IModel[0] : added;
  }

  public IModel[] getRemovedModels() {
    return (removed == null) ? new IModel[0] : removed;
  }

  public IModel[] getChangedModels() {
    return (changed == null) ? new IModel[0] : changed;
  }

  public int getEventTypes() {
    return types;
  }

  public Object getEventSource() {
    return source;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.