001    /**
002     * <copyright>
003     *
004     * Copyright (c) 2002-2006 IBM Corporation and others.
005     * All rights reserved.   This program and the accompanying materials
006     * are made available under the terms of the Eclipse Public License v1.0
007     * which accompanies this distribution, and is available at
008     * http://www.eclipse.org/legal/epl-v10.html
009     * 
010     * Contributors: 
011     *   IBM - Initial API and implementation
012     *
013     * </copyright>
014     *
015     * $Id: EList.java,v 1.3 2006/12/05 20:19:54 emerks Exp $
016     */
017    package org.eclipse.emf.common.util;
018    
019    
020    import java.util.List;
021    
022    
023    /**
024     * A list that supports move.
025     */
026    public interface EList<E> extends List<E>
027    {
028      /**
029       * Moves the object to the new position, if is in the list.
030       * @param newPosition the position of the object after the move.
031       * @param object the object to move.
032       */
033      void move(int newPosition, E object);
034    
035      /**
036       * Moves the object from the old position to the new position.
037       * @param newPosition the position of the object after the move.
038       * @param oldPosition the position of the object before the move.
039       * @return the moved object.
040       */
041      E move(int newPosition, int oldPosition);
042    }