.. java:import:: java.util Iterator Table ===== .. java:package:: com.ampl :noindex: .. java:type:: public class Table extends BasicEntity Constructors ------------ Table ^^^^^ .. java:constructor:: public Table(Entity entity) :outertype: Table Constructor Table ^^^^^ .. java:constructor:: protected Table(TableBase impl) :outertype: Table Methods ------- get ^^^ .. java:method:: public TableInstance get() :outertype: Table Get the corresponding :java:ref:`TableInstance` instance (for not indexed tables) :throws IllegalArgumentException: if the entity has been deleted in the underlying AMPL :throws UnsupportedOperationException: if the entity is not scalar. get ^^^ .. java:method:: public final TableInstance get(Object... key) throws IllegalArgumentException :outertype: Table Get the table instance corresponding to the specified key. See :ref:`secAccessInstancesAndValues` for further information on how the key can be specified. :param key: The key to be found :throws IllegalArgumentException: if trying to access an instance with the wrong number of keys (see :java:ref:`Entity.indexarity`) :return: The instance corresponding to the specified key. Returns ``null`` if the specified key is not present. get ^^^ .. java:method:: @Override public TableInstance get(Tuple key) :outertype: Table Get the table instance corresponding to the specified key, expressed as a Tuple. See :ref:`secAccessInstancesAndValues` for further information on how the key can be specified. :param key: The indexing Tuple of the instance to be found :throws IllegalArgumentException: if trying to access an instance with the wrong indexarity (see :java:ref:`Entity.indexarity`) :return: The table instance corresponding to the specified key. Returns ``null`` if the specified key is not present. impl ^^^^ .. java:method:: TableBase impl() :outertype: Table iterator ^^^^^^^^ .. java:method:: @Override public Iterator iterator() :outertype: Table