All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ocl.expressions.impl.UnlimitedNaturalLiteralExpImpl Maven / Gradle / Ivy

/**
 * 
 * 
 * Copyright (c) 2006, 2009 IBM Corporation, Zeligsoft 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
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *   IBM - Initial API and implementation
 *   Zeligsoft - Bug 207365
 * 
 * 
 *
 * $Id: UnlimitedNaturalLiteralExpImpl.java,v 1.8 2009/01/23 17:16:04 cdamus Exp $
 */
package org.eclipse.ocl.expressions.impl;

import java.util.Map;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.ocl.expressions.ExpressionsPackage;
import org.eclipse.ocl.expressions.UnlimitedNaturalLiteralExp;
import org.eclipse.ocl.expressions.operations.UnlimitedNaturalLiteralExpOperations;
import org.eclipse.ocl.utilities.Visitor;

/**
 * 
 * An implementation of the model object 'Unlimited Natural Literal Exp'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.eclipse.ocl.expressions.impl.UnlimitedNaturalLiteralExpImpl#getIntegerSymbol Integer Symbol}
  • *
  • {@link org.eclipse.ocl.expressions.impl.UnlimitedNaturalLiteralExpImpl#isUnlimited Unlimited}
  • *
*

* * @generated */ public class UnlimitedNaturalLiteralExpImpl extends NumericLiteralExpImpl implements UnlimitedNaturalLiteralExp { /** * The default value of the '{@link #getIntegerSymbol() Integer Symbol}' attribute. * * * @see #getIntegerSymbol() * @generated * @ordered */ protected static final Integer INTEGER_SYMBOL_EDEFAULT = null; /** * The cached value of the '{@link #getIntegerSymbol() Integer Symbol}' attribute. * * * @see #getIntegerSymbol() * @generated * @ordered */ protected Integer integerSymbol = INTEGER_SYMBOL_EDEFAULT; /** * The default value of the '{@link #isUnlimited() Unlimited}' attribute. * * * @see #isUnlimited() * @generated * @ordered */ protected static final boolean UNLIMITED_EDEFAULT = false; /** * * * @generated */ protected UnlimitedNaturalLiteralExpImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ExpressionsPackage.Literals.UNLIMITED_NATURAL_LITERAL_EXP; } /** * * * @generated */ public Integer getIntegerSymbol() { return integerSymbol; } /** * * * @generated */ public void setIntegerSymbol(Integer newIntegerSymbol) { Integer oldIntegerSymbol = integerSymbol; integerSymbol = newIntegerSymbol; if (eNotificationRequired()) eNotify(new ENotificationImpl( this, Notification.SET, ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL, oldIntegerSymbol, integerSymbol)); } /** * * * @generated NOT */ public boolean isUnlimited() { return getIntegerSymbol() == UNLIMITED; } /** * * * @generated */ public boolean checkNaturalType(DiagnosticChain diagnostics, Map context) { return UnlimitedNaturalLiteralExpOperations.checkNaturalType(this, diagnostics, context); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : return getIntegerSymbol(); case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__UNLIMITED : return isUnlimited(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : setIntegerSymbol((Integer) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : setIntegerSymbol(INTEGER_SYMBOL_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__INTEGER_SYMBOL : return INTEGER_SYMBOL_EDEFAULT == null ? integerSymbol != null : !INTEGER_SYMBOL_EDEFAULT.equals(integerSymbol); case ExpressionsPackage.UNLIMITED_NATURAL_LITERAL_EXP__UNLIMITED : return isUnlimited() != UNLIMITED_EDEFAULT; } return super.eIsSet(featureID); } /** * @generated NOT */ @Override @SuppressWarnings("unchecked") public > T accept(U v) { return ((Visitor) v) .visitUnlimitedNaturalLiteralExp(this); } /** * * * @generated NOT */ @Override public String toString() { return super.toString(); } } //UnlimitedNaturalLiteralExpImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy