blob: cb071fae6c9a59407f0bbe6861090a0bad1c1956 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2019 Xored Software Inc 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
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.ecl.data.commands.impl;
import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.rcptt.ecl.core.impl.CommandImpl;
import org.eclipse.rcptt.ecl.data.commands.CommandsPackage;
import org.eclipse.rcptt.ecl.data.commands.Print;
/**
* <!-- begin-user-doc --> An implementation of the model object '
* <em><b>Print</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.rcptt.ecl.data.commands.impl.PrintImpl#getInput <em>Input</em>}</li>
* </ul>
*
* @generated
*/
public class PrintImpl extends CommandImpl implements Print {
/**
* The cached value of the '{@link #getInput() <em>Input</em>}' reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getInput()
* @generated
* @ordered
*/
protected EList<EObject> input;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
protected PrintImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CommandsPackage.Literals.PRINT;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public EList<EObject> getInput() {
if (input == null) {
input = new EObjectResolvingEList<EObject>(EObject.class, this, CommandsPackage.PRINT__INPUT);
}
return input;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CommandsPackage.PRINT__INPUT:
return getInput();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CommandsPackage.PRINT__INPUT:
getInput().clear();
getInput().addAll((Collection<? extends EObject>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CommandsPackage.PRINT__INPUT:
getInput().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CommandsPackage.PRINT__INPUT:
return input != null && !input.isEmpty();
}
return super.eIsSet(featureID);
}
} // PrintImpl