Repository: google/filament
File: android/filament-android/src/main/java/com/google/android/filament/Material.java (Java)

Code before:
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public List<Parameter> getParameters() {
        int count = getParameterCount();
        List<Parameter> parameters = new ArrayList<>(count);
        if (count > 0) nGetParameters(getNativeObject(), parameters, count);
        return parameters;
    }

    /**
     * Indicates whether a parameter of the given name exists on this material.
     *
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public boolean hasParameter(@NonNull String name) {
        return nHasParameter(getNativeObject(), name);
    }

    /**
     * 
     * Returns the name of the transform name parameter associated with the given sampler parameter. 
     * In the case the parameter don't have a transform name field, it will return an empty value.
     * 
     * @param samplerName the name of the sampler parameter to query.
     * 
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public String getParameterTransformName(@NonNull String samplerName) {
        return nGetParameterTransformName(getNativeObject(), samplerName);
    }

    /**
     * Sets the value of a bool parameter on this material's default instance.
     *
     * @param name the name of the material parameter
     * @param x    the value of the material parameter
     *
     * @see Material#getDefaultInstance()
     */
    public void setDefaultParameter(@NonNull String name, boolean x) {
        mDefaultInstance.setParameter(name, x);
    }

    /**
     * Sets the value of a float parameter on this material's default instance.

Review comment (suggestion):
```suggestion
     * In the case the parameter doesn't have a transform name field, it will return an empty string.
```

Code after:
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public List<Parameter> getParameters() {
        int count = getParameterCount();
        List<Parameter> parameters = new ArrayList<>(count);
        if (count > 0) nGetParameters(getNativeObject(), parameters, count);
        return parameters;
    }

    /**
     * Indicates whether a parameter of the given name exists on this material.
     *
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public boolean hasParameter(@NonNull String name) {
        return nHasParameter(getNativeObject(), name);
    }

    /**
     * 
     * Returns the name of the transform parameter associated with the given sampler parameter.
     * In the case the parameter doesn't have a transform name field, it will return an empty string.
     * 
     * @param samplerName the name of the sampler parameter to query.
     * 
     * @see
     * <a href="https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/general:parameters">
     * General: parameters</a>
     */
    public String getParameterTransformName(@NonNull String samplerName) {
        return nGetParameterTransformName(getNativeObject(), samplerName);
    }

    /**
     * Sets the value of a bool parameter on this material's default instance.
     *
     * @param name the name of the material parameter
     * @param x    the value of the material parameter
     *
     * @see Material#getDefaultInstance()
     */
    public void setDefaultParameter(@NonNull String name, boolean x) {
        mDefaultInstance.setParameter(name, x);
    }

    /**
     * Sets the value of a float parameter on this material's default instance.