Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*******************************************************************************2 * Copyright (c) 2005, 2006 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 *8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/11 12 package org.eclipse.core.commands;13 14 /**15 * <p>16 * An object that holds zero or more state objects. This state information can17 * be shared between different instances of <code>IObjectWithState</code>.18 * </p>19 * <p>20 * Clients may implement, but must not extend this interface.21 * </p>22 * 23 * @see AbstractHandlerWithState24 * @since 3.225 */26 publicinterface IObjectWithState {27 28 /**29 * Adds state to this object.30 * 31 * @param id32 * The identifier indicating the type of state being added; must33 * not be <code>null</code>.34 * @param state35 * The new state to add to this object; must not be36 * <code>null</code>.37 */38 publicvoid addState(String id, State state);39 40 /**41 * Gets the state with the given id.42 * 43 * @param stateId44 * The identifier of the state to retrieve; must not be45 * <code>null</code>.46 * @return The state; may be <code>null</code> if there is no state with47 * the given id.48 */49 publicState getState(String stateId);50 51 /**52 * Gets the identifiers for all of the state associated with this object.53 * 54 * @return All of the state identifiers; may be empty, but never55 * <code>null</code>.56 */57 publicString[] getStateIds();58 59 /**60 * Removes state from this object.61 * 62 * @param stateId63 * The id of the state to remove from this object; must not be64 * <code>null</code>.65 */66 publicvoid removeState(String stateId);67 }68