/**
  * Clears the list of all its members. If some members were never used, a warning will be printed
  * to remind the user something may be wrong.
  */
 public void clear(boolean showUnused) {
   if (showUnused) {
     for (FastHashMap.Entry<String, Parameter> e : list) {
       if (!e.getValue().checked)
         UI.printWarning(Module.API, "Unused parameter: %s - %s", e.getKey(), e.getValue());
     }
   }
   list.clear();
   numVerts = numFaces = numFaceVerts = 0;
 }
 /**
  * Get the specified texture coordinate array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public FloatParameter getTexCoordArray(String name) {
   return getFloatParameter(name, ParameterType.TEXCOORD, list.get(name));
 }
 /**
  * Get the specified vector array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public FloatParameter getVectorArray(String name) {
   return getFloatParameter(name, ParameterType.VECTOR, list.get(name));
 }
 /**
  * Get the specified point array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public FloatParameter getPointArray(String name) {
   return getFloatParameter(name, ParameterType.POINT, list.get(name));
 }
 /**
  * Get the specified float array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public FloatParameter getFloatArray(String name) {
   return getFloatParameter(name, ParameterType.FLOAT, list.get(name));
 }
 /**
  * Get the specified matrix parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public Matrix4 getMatrix(String name, Matrix4 defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.MATRIX, InterpolationType.NONE, 1, p))
     return p.getMatrix();
   return defaultValue;
 }
 /**
  * Get the specified texture coordinate parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public Point2 getTexCoord(String name, Point2 defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.TEXCOORD, InterpolationType.NONE, 1, p))
     return p.getTexCoord();
   return defaultValue;
 }
 /**
  * Get the specified string parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public String getString(String name, String defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.STRING, InterpolationType.NONE, 1, p))
     return p.getStringValue();
   return defaultValue;
 }
 /**
  * Get the specified point parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public Point3 getPoint(String name, Point3 defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.POINT, InterpolationType.NONE, 1, p))
     return p.getPoint();
   return defaultValue;
 }
 /**
  * Get the specified color parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public Color getColor(String name, Color defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.COLOR, InterpolationType.NONE, 1, p))
     return p.getColor();
   return defaultValue;
 }
 /**
  * Get the specified float parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public float getFloat(String name, float defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.FLOAT, InterpolationType.NONE, 1, p))
     return p.getFloatValue();
   return defaultValue;
 }
 /**
  * Get the specified boolean parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public boolean getBoolean(String name, boolean defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.BOOL, InterpolationType.NONE, 1, p))
     return p.getBoolValue();
   return defaultValue;
 }
 /**
  * Get the specified integer array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public int[] getIntArray(String name) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.INT, InterpolationType.NONE, -1, p))
     return p.getInts();
   return null;
 }
 /**
  * Get the specified integer parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public int getInt(String name, int defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.INT, InterpolationType.NONE, 1, p))
     return p.getIntValue();
   return defaultValue;
 }
 /**
  * Get the specified string array parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public String[] getStringArray(String name, String[] defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.STRING, InterpolationType.NONE, -1, p))
     return p.getStrings();
   return defaultValue;
 }
 /**
  * Get the specified matrix array parameter from this list.
  *
  * @param name name of the parameter
  * @return the value of the parameter specified or <code>null</code> if not found
  */
 public FloatParameter getMatrixArray(String name) {
   return getFloatParameter(name, ParameterType.MATRIX, list.get(name));
 }
 /**
  * Get the specified vector parameter from this list.
  *
  * @param name name of the parameter
  * @param defaultValue value to return if not found
  * @return the value of the parameter specified or default value if not found
  */
 public Vector3 getVector(String name, Vector3 defaultValue) {
   Parameter p = list.get(name);
   if (isValidParameter(name, ParameterType.VECTOR, InterpolationType.NONE, 1, p))
     return p.getVector();
   return defaultValue;
 }
 private void add(String name, Parameter param) {
   if (name == null) UI.printError(Module.API, "Cannot declare parameter with null name");
   else if (list.put(name, param) != null)
     UI.printWarning(Module.API, "Parameter %s was already defined -- overwriting", name);
 }