.. java:import:: java.util HashSet .. java:import:: java.util Iterator .. java:import:: java.util List .. java:import:: java.util Map .. java:import:: java.util Set BasicEntity =========== .. java:package:: com.ampl :noindex: .. java:type:: public abstract class BasicEntity extends Entity implements Iterable Infrastructure class to enable the inheriting classes type-safe access to instances. Constructors ------------ BasicEntity ^^^^^^^^^^^ .. java:constructor:: BasicEntity(EntityBase impl) :outertype: BasicEntity Constructor Methods ------- get ^^^ .. java:method:: public abstract T get() :outertype: BasicEntity Get the instance corresponding to a scalar entity. :throws UnsupportedOperationException: if the entity is not scalar. :throws IllegalStateException: if the entity has been deleted in the underlying AMPL interpreter :return: The corresponding instance. get ^^^ .. java:method:: public abstract T get(Object... key) :outertype: BasicEntity Get the instance corresponding to the specified key. See :ref:`secAccessInstancesAndValues` for further information on how the key can be specified. :param key: Key of the instance to be found. :throws IllegalArgumentException: if trying to access an instance with the wrong number of keys (see :java:ref:`Entity.indexarity`) :throws IllegalStateException: if the entity has been deleted in the underlying AMPL interpreter :return: The instance corresponding to the key, or ``null`` if the specified key is not found. get ^^^ .. java:method:: public abstract T get(Tuple key) :outertype: BasicEntity Get the instance corresponding to the specified tuple. See :ref:`secAccessInstancesAndValues` for further information on how the key can be specified. :param key: Key (in form of Tuple) of the instance to be found. :throws IllegalArgumentException: if trying to access an instance with the wrong number of keys (see :java:ref:`Entity.indexarity`) :throws IllegalStateException: if the entity has been deleted in the underlying AMPL interpreter :return: The instance corresponding to the key, or ``null`` if the specified key is not found. iterator ^^^^^^^^ .. java:method:: public abstract Iterator iterator() :outertype: BasicEntity