eishub / eis

The Environment Interface Standard (EIS) is a Java-based interface standard for connecting agents to controllable entities in an environment such as a game. The interface provides support for managing the connection (e.g., for pausing and terminating an environment) and for interaction between agents and entities that are available in an environment (e.g., bots in a game). An agent that is connected to a controllable entity receives percepts from and can send actions to that entity. Percepts inform the agent about the state of the entity and its environment. Actions tell the entity which actions to perform in its environment. Several example implementations of environments are available @github.com/eishub. A default implementation of the EIS interface is also provided.
GNU General Public License v3.0
9 stars 4 forks source link

eis.iilang.ParameterList needs a size() #16

Closed Wouter1 closed 10 years ago

Wouter1 commented 10 years ago

Usecase:

When using EIS2Java to translate Parameter lists into an array list it is useful to know the size of a parameter list to pre-allocate the new collection. This results in more efficient code.

For example:

ParameterList parameterList = (ParameterList) parameter;

List list = new ArrayList(parameterList.size());

for (Parameter p : parameterList) { String string = Translator.getInstance().translate2Java(p, String.class); list.add(string); }

return list; }

Requested change:

/**

Wouter1 commented 10 years ago

size() function is available