com.iprogrammerr.gentle.request.initialization.ArraysToList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gentle-request Show documentation
Show all versions of gentle-request Show documentation
Compact library for creating and reading http requests.
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