EntityMap ========= .. java:package:: com.ampl :noindex: .. java:type:: public interface EntityMap> extends Iterable Represents an immutable and synchronised list of AMPL entities. It can be obtained using the functions :java:ref:`AMPL.getVariables`, :java:ref:`AMPL.getConstraints`, :java:ref:`AMPL.getSets`, :java:ref:`AMPL.getObjectives`, :java:ref:`AMPL.getParameters`. The collection cannot be modified by the user (entities cannot be added nor deleted) and is linked to an :java:ref:`AMPL` object. When the corresponding AMPL entities are modified (through :java:ref:`AMPL.eval` or any other operation which influences the number of entities), the collection is automatically invalidated. It is updated lazily at the next access. If the corresponding :java:ref:`AMPL` object is not running anymore, or it is null, an exception is thrown on all operations. Methods ------- find ^^^^ .. java:method:: public E find(String name) :outertype: EntityMap Get an entity by name. :param name: Name of the entity to get :return: The corresponding :java:ref:`ampl.Entity` size ^^^^ .. java:method:: public int size() :outertype: EntityMap Get the number of items in the collection