All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.iprogrammerr.gentle.request.initialization.ArraysToList Maven / Gradle / Ivy

The newest version!
package com.iprogrammerr.gentle.request.initialization;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public final class ArraysToList implements Initialization> {

	private final T[] base;
	private final T[] toAppend;

	@SafeVarargs
	public ArraysToList(T[] base, T... toAppend) {
		this.base = base;
		this.toAppend = toAppend;
	}

	@Override
	public List value() {
		List list = new ArrayList<>(this.base.length + this.toAppend.length);
		list.addAll(Arrays.asList(this.base));
		list.addAll(Arrays.asList(this.toAppend));
		return list;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy