From 8344debbc00c47bc35f7243403ba29e2e01ae24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Galland?= Date: Tue, 25 Nov 2014 21:05:00 +0100 Subject: [PATCH] [lang] Update the documentation of AgentContext. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see #242 see janus-project/janusproject#92 Signed-off-by: Stéphane Galland --- .../src/io/sarl/lang/core/AgentContext.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/io.sarl.lang.core/src/io/sarl/lang/core/AgentContext.java b/plugins/io.sarl.lang.core/src/io/sarl/lang/core/AgentContext.java index fe03fabfc5..c2b263b0a0 100644 --- a/plugins/io.sarl.lang.core/src/io/sarl/lang/core/AgentContext.java +++ b/plugins/io.sarl.lang.core/src/io/sarl/lang/core/AgentContext.java @@ -56,6 +56,8 @@ public interface AgentContext { /** Create an instance of space following the given specification. * This function always creates a new instance of space. + * It means that is a space with the given identifier already + * exists, this function does nothing and replies null. * If you want to find an existing space prior to the creation of * a new one, you should use {@link #getOrCreateSpace(Class, UUID, Object...)}. * @@ -63,7 +65,7 @@ public interface AgentContext { * @param spec - specification of the space to create. * @param spaceUUID - identifier of the new space. * @param creationParams - parameters to pass to the space constructor. - * @return the new space. + * @return the new space, or null if the space already exists. * @see #getOrCreateSpace(Class, UUID, Object...) * @see #getSpace(UUID) */ @@ -80,14 +82,14 @@ S createSpace(Class> spec, /** Retreive or create an instance of space following the given specification. * This function tries to find a space that fits the given specification. - * If none wis found, this function create a new space in the same way as + * If none was found, this function create a new space in the same way as * {@link #createSpace(Class, UUID, Object...)}. * * @param - type of the replied space. * @param spec - specification of the space to create. * @param spaceUUID - identifier of the new space. * @param creationParams - parameters to pass to the space constructor. - * @return the new space. + * @return the new space, never null. * @see #createSpace(Class, UUID, Object...) * @see #getSpace(UUID) */