/** * Gets the command {@link ParameterType} with the given identifier. If no * such command parameter type currently exists, then the command parameter * type will be created (but will be undefined). * * @param parameterTypeId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The {@link ParameterType} with the given identifier; this value * will never be <code>null</code>, but it might be undefined. * @since 3.2 */ public final ParameterType getParameterType(final String parameterTypeId) { checkId(parameterTypeId); ParameterType parameterType = parameterTypesById.get(parameterTypeId); if (parameterType == null) { parameterType = new ParameterType(parameterTypeId); parameterTypesById.put(parameterTypeId, parameterType); parameterType.addListener(this); } return parameterType; }
/** * Gets the command {@link ParameterType} with the given identifier. If no * such command parameter type currently exists, then the command parameter * type will be created (but will be undefined). * * @param parameterTypeId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The {@link ParameterType} with the given identifier; this value * will never be <code>null</code>, but it might be undefined. * @since 3.2 */ public ParameterType getParameterType(final String parameterTypeId) { checkId(parameterTypeId); ParameterType parameterType = parameterTypesById.get(parameterTypeId); if (parameterType == null) { parameterType = new ParameterType(parameterTypeId); parameterTypesById.put(parameterTypeId, parameterType); parameterType.addListener(this); } return parameterType; }
/** * Gets the command {@link ParameterType} with the given identifier. If no * such command parameter type currently exists, then the command parameter * type will be created (but will be undefined). * * @param parameterTypeId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The {@link ParameterType} with the given identifier; this value * will never be <code>null</code>, but it might be undefined. * @since 3.2 */ public final ParameterType getParameterType(final String parameterTypeId) { checkId(parameterTypeId); ParameterType parameterType = parameterTypesById.get(parameterTypeId); if (parameterType == null) { parameterType = new ParameterType(parameterTypeId); parameterTypesById.put(parameterTypeId, parameterType); parameterType.addListener(this); } return parameterType; }