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

org.omg.bpmn.bpmn2.impl.ParticipantMultiplicityImpl Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2012 - 2024 Data In Motion and others.
 * All rights reserved. 
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *      Mark Hoffmann - initial API and implementation
 */
package org.omg.bpmn.bpmn2.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

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

import org.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.ParticipantMultiplicity;

/**
 * 
 * An implementation of the model object 'Participant Multiplicity'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.bpmn2.impl.ParticipantMultiplicityImpl#getMaximum Maximum}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ParticipantMultiplicityImpl#getMinimum Minimum}
  • *
* * @generated */ public class ParticipantMultiplicityImpl extends BaseElementImpl implements ParticipantMultiplicity { /** * The default value of the '{@link #getMaximum() Maximum}' attribute. * * * @see #getMaximum() * @generated * @ordered */ protected static final int MAXIMUM_EDEFAULT = 1; /** * The cached value of the '{@link #getMaximum() Maximum}' attribute. * * * @see #getMaximum() * @generated * @ordered */ protected int maximum = MAXIMUM_EDEFAULT; /** * The default value of the '{@link #getMinimum() Minimum}' attribute. * * * @see #getMinimum() * @generated * @ordered */ protected static final int MINIMUM_EDEFAULT = 0; /** * The cached value of the '{@link #getMinimum() Minimum}' attribute. * * * @see #getMinimum() * @generated * @ordered */ protected int minimum = MINIMUM_EDEFAULT; /** * * * @generated */ protected ParticipantMultiplicityImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.eINSTANCE.getParticipantMultiplicity(); } /** * * * @generated */ @Override public int getMaximum() { return maximum; } /** * * * @generated */ @Override public void setMaximum(int newMaximum) { int oldMaximum = maximum; maximum = newMaximum; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM, oldMaximum, maximum)); } /** * * * @generated */ @Override public int getMinimum() { return minimum; } /** * * * @generated */ @Override public void setMinimum(int newMinimum) { int oldMinimum = minimum; minimum = newMinimum; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM, oldMinimum, minimum)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM: return getMaximum(); case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM: return getMinimum(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM: setMaximum((Integer)newValue); return; case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM: setMinimum((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM: setMaximum(MAXIMUM_EDEFAULT); return; case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM: setMinimum(MINIMUM_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MAXIMUM: return maximum != MAXIMUM_EDEFAULT; case Bpmn2Package.PARTICIPANT_MULTIPLICITY__MINIMUM: return minimum != MINIMUM_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (maximum: "); result.append(maximum); result.append(", minimum: "); result.append(minimum); result.append(')'); return result.toString(); } } //ParticipantMultiplicityImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy