添加组件

@param values
@return
517152
public Toolbox feature(Object... values) {
        if (values == null && values.length == 0) {
            return this;
        }
        if (this.feature == null) {
            this.feature = new LinkedHashMap<String, Feature>();
        }
        for (Object t : values) {
            if (t instanceof Feature) {
                _addFeature((Feature) t);
            } else if (t instanceof Tool) {
                switch ((Tool) t) {
                    case dataView:
                        _addFeatureOnce(t, Feature.dataView);
                        break;
                    case dataZoom:
                        _addFeatureOnce(t, Feature.dataZoom);
                        break;
                    case magicType:
                        _addFeatureOnce(t, Feature.magicType);
                        break;
                    case mark:
                        _addFeatureOnce(t, Feature.mark);
                        break;
                    case restore:
                        _addFeatureOnce(t, Feature.restore);
                        break;
                    case saveAsImage:
                        _addFeatureOnce(t, Feature.saveAsImage);
                        break;
                    default:
                        //ignore
                }
            }
        }
        return this;
    }
1353832
public void add(ShortArrayList values) {
        ensureCapacity(size + values.size);
        for (int i=0; i<values.size; i++) {
            this.add(values.elements[i]);
        }
    }
208680
public static Float[] wrap(float... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new Float[0];
		}

		final Float[] array = new Float[length];
		for (int i = 0; i < length; i++) {
			array[i] = Float.valueOf(values[i]);
		}
		return array;
	}
935133
public JsonWriter values(Iterable<String> values) {
    for (String value : values) {
      value(value);
    }
    return this;
  }
528273
public Legend data(Object... values) {
        if (values == null || values.length == 0) {
            return this;
        }
        this.data().addAll(Arrays.asList(values));
        return this;
    }
345571
public void add(String name, String... values) {
    if (containsKey(name)) {
      List<String> list = get(name);
      for (String value: values) {
        list.add(value);
      }
    } else {
      put(name, values);
    }
  }
1162091
public static JsonArray array(int... values) {
    if (values == null) {
      throw new NullPointerException(VALUES_IS_NULL);
    }
    JsonArray array = new JsonArray();
    for (int value : values) {
      array.add(value);
    }
    return array;
  }
1358605
public static <T> Collection<T> addAll(Collection<T> collection, T[] values) {
		if (null != collection && null != values) {
			for (T value : values) {
				collection.add(value);
			}
		}
		return collection;
	}
1360320
public boolean addArray(float... values) {
        if (end + values.length >= this.values.length) {
            this.values = grow(this.values, (this.values.length + values.length) * 2);
        }

        System.arraycopy(values, 0, this.values, end, values.length);
        end += values.length;
        return true;
    }
543462
static double[] incremental(final double[] values) {
		final DoubleAdder adder = new DoubleAdder(values[0]);
		for (int i = 1; i < values.length; ++i) {
			values[i] = adder.add(values[i]).doubleValue();
		}
		return values;
	}
1206571
public static Builder pushAll(String field, Object... values) {
        return new Builder().pushAll(field, values);
    }
776712
public static <E> List<E> newArrayList(E... values) {
    List<E> list = new ArrayList<E>(values.length);
    for (E e : values) {
      list.add(e);
    }
    return list;
  }
671841
function add(values, value) {
  var self = this

  if (value) {
    self.map[values] = value
  } else {
    addAll(self.map, values)
  }

  return self
}
715078
public static JCalValue multi(List<?> values) {
		List<JsonValue> multiValues = new ArrayList<JsonValue>(values.size());
		for (Object value : values) {
			multiValues.add(new JsonValue(value));
		}
		return new JCalValue(multiValues);
	}
214200
public static <T extends Object> T[] append (T[] values, T value)
    {
        return insert(values, value, values.length);
    }
1296965
public ListOrdersRequest withFulfillmentChannel(String... values) {
        List<String> list = getFulfillmentChannel();
        for (String value : values) {
            list.add(value);
        }
        return this;
    }
63143
public void addDerivedDates(Map<String, Object> values) {
        Map<String, Object> valuesToAdd = new HashMap<String, Object>();

        for (Map.Entry<String, Object> entry : values.entrySet()) {
            String key = entry.getKey();
            Object object = entry.getValue();
            if (object != null) {
                String stringValue = object.toString();
                Matcher matcher = XML_DATE.matcher(stringValue);
                if (matcher.matches()) {
                    handleXmlMatch(matcher, valuesToAdd, key);
                } else {
                    matcher = NL_DATE.matcher(stringValue);
                    if (matcher.matches()) {
                        handleNLMatch(matcher, valuesToAdd, key);
                    }
                }
            }
        }
        values.putAll(valuesToAdd);
    }