/**
 */
package ua.ansymo.hintco;

import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Unit Instance</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * </p>
 * <ul>
 *   <li>{@link ua.ansymo.hintco.UnitInstance#getScenario <em>Scenario</em>}</li>
 *   <li>{@link ua.ansymo.hintco.UnitInstance#getAdaptation <em>Adaptation</em>}</li>
 *   <li>{@link ua.ansymo.hintco.UnitInstance#getPorts <em>Ports</em>}</li>
 * </ul>
 *
 * @see ua.ansymo.hintco.HintcoPackage#getUnitInstance()
 * @model abstract="true"
 * @generated
 */
public interface UnitInstance extends IDed, PrecedenceNode {
	/**
	 * Returns the value of the '<em><b>Scenario</b></em>' container reference.
	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.Scenario#getCosimunits <em>Cosimunits</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Scenario</em>' container reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Scenario</em>' container reference.
	 * @see #setScenario(Scenario)
	 * @see ua.ansymo.hintco.HintcoPackage#getUnitInstance_Scenario()
	 * @see ua.ansymo.hintco.Scenario#getCosimunits
	 * @model opposite="cosimunits" transient="false"
	 * @generated
	 */
	Scenario getScenario();

	/**
	 * Sets the value of the '{@link ua.ansymo.hintco.UnitInstance#getScenario <em>Scenario</em>}' container reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Scenario</em>' container reference.
	 * @see #getScenario()
	 * @generated
	 */
	void setScenario(Scenario value);

	/**
	 * Returns the value of the '<em><b>Adaptation</b></em>' containment reference.
	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.UnitAdaptation#getUnit <em>Unit</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Adaptation</em>' containment reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Adaptation</em>' containment reference.
	 * @see #setAdaptation(UnitAdaptation)
	 * @see ua.ansymo.hintco.HintcoPackage#getUnitInstance_Adaptation()
	 * @see ua.ansymo.hintco.UnitAdaptation#getUnit
	 * @model opposite="unit" containment="true"
	 * @generated
	 */
	UnitAdaptation getAdaptation();

	/**
	 * Sets the value of the '{@link ua.ansymo.hintco.UnitInstance#getAdaptation <em>Adaptation</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Adaptation</em>' containment reference.
	 * @see #getAdaptation()
	 * @generated
	 */
	void setAdaptation(UnitAdaptation value);

	/**
	 * Returns the value of the '<em><b>Ports</b></em>' containment reference list.
	 * The list contents are of type {@link ua.ansymo.hintco.PortInstance}.
	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.PortInstance#getUnit <em>Unit</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Ports</em>' containment reference list isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Ports</em>' containment reference list.
	 * @see ua.ansymo.hintco.HintcoPackage#getUnitInstance_Ports()
	 * @see ua.ansymo.hintco.PortInstance#getUnit
	 * @model opposite="unit" containment="true"
	 * @generated
	 */
	EList<PortInstance> getPorts();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='&lt;%ua.ansymo.hintco.UnitAdaptation%&gt; _adaptation = this.getAdaptation();\nboolean _tripleEquals = (_adaptation == null);\nif (_tripleEquals)\n{\n\treturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;newArrayList()));\n}\nboolean _isSelected = this.getAdaptation().isSelected();\nif (_isSelected)\n{\n\t&lt;%ua.ansymo.hintco.UnitAdaptation%&gt; _adaptation_1 = this.getAdaptation();\n\tif ((_adaptation_1 instanceof &lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%&gt;))\n\t{\n\t\t&lt;%ua.ansymo.hintco.UnitAdaptation%&gt; _adaptation_2 = this.getAdaptation();\n\t\treturn ((&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%&gt;) _adaptation_2).selectedAdaptations();\n\t}\n\t&lt;%ua.ansymo.hintco.UnitAdaptation%&gt; _adaptation_3 = this.getAdaptation();\n\treturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;newArrayList(_adaptation_3)));\n}\nreturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%&gt;&gt;newArrayList()));'"
	 * @generated
	 */
	EList<UnitAdaptation> selectedAdaptations();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model kind="operation" unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%&gt;&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%&gt;, &lt;%java.lang.Boolean%&gt;&gt; _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%&gt;&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%&gt;, &lt;%java.lang.Boolean%&gt;&gt;()\n{\n\tpublic &lt;%java.lang.Boolean%&gt; apply(final &lt;%ua.ansymo.hintco.OutputPortInstance%&gt; it)\n\t{\n\t\tboolean _isInput = it.isInput();\n\t\treturn &lt;%java.lang.Boolean%&gt;.valueOf((!_isInput));\n\t}\n};\nreturn &lt;%org.eclipse.emf.common.util.ECollections%&gt;.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%&gt;&gt;toEList(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%&gt;.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%&gt;&gt;filter(&lt;%com.google.common.collect.Iterables%&gt;.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%&gt;&gt;filter(this.getPorts(), &lt;%ua.ansymo.hintco.OutputPortInstance%&gt;.class), _function));'"
	 * @generated
	 */
	EList<OutputPortInstance> getOutputPorts();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model kind="operation" unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%&gt;&lt;&lt;%ua.ansymo.hintco.InputPortInstance%&gt;, &lt;%java.lang.Boolean%&gt;&gt; _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%&gt;&lt;&lt;%ua.ansymo.hintco.InputPortInstance%&gt;, &lt;%java.lang.Boolean%&gt;&gt;()\n{\n\tpublic &lt;%java.lang.Boolean%&gt; apply(final &lt;%ua.ansymo.hintco.InputPortInstance%&gt; it)\n\t{\n\t\treturn &lt;%java.lang.Boolean%&gt;.valueOf(it.isInput());\n\t}\n};\nreturn &lt;%org.eclipse.emf.common.util.ECollections%&gt;.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%&gt;&gt;toEList(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%&gt;.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%&gt;&gt;filter(&lt;%com.google.common.collect.Iterables%&gt;.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%&gt;&gt;filter(this.getPorts(), &lt;%ua.ansymo.hintco.InputPortInstance%&gt;.class), _function));'"
	 * @generated
	 */
	EList<InputPortInstance> getInputPorts();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='return this.getIdentifier();'"
	 * @generated
	 */
	String toString();

} // UnitInstance
