public void addAll(final Iterable<? extends T> values) {
		if (values instanceof Buffer<?> buff) {
			final Object[] array = buff.toArray();
			addAll(array, 0, array.length);
		} else if (values instanceof Collection<?> coll) {
			final Object[] array = coll.toArray();
			addAll(array, 0, array.length);
		} else {
			for (T value : values) {
				add(value);
			}
		}
	}
Add the given values to the ring buffer.

@param values the values being added to the ring buffer
@throws NullPointerException if the given parameter is {@code null}
jenetics/src/main/java/io/jenetics/util/Buffer.java