Update addVectors methods

This commit is contained in:
JeremyStar™ 2024-07-08 14:28:15 +02:00
parent 0afe18d857
commit c91a2151e9
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -62,7 +62,18 @@ public final class DependencyResolver {
* @param vectors dependency vectors to add * @param vectors dependency vectors to add
* @since 1-alpha1 * @since 1-alpha1
*/ */
public DependencyResolver addVectors(@NotNull Collection<@NotNull DependencyVector> vectors) { public DependencyResolver addVectors(@NotNull DependencyVector[] vectors) {
addVectors(Arrays.stream(vectors).toList());
return this;
}
/**
* Adds multiple dependency vectors.
*
* @param vectors dependency vectors to add
* @since 1-alpha1
*/
public DependencyResolver addVectors(@NotNull Collection<? extends @NotNull DependencyVector> vectors) {
this.vectors.addAll(vectors); this.vectors.addAll(vectors);
return this; return this;
} }
@ -73,8 +84,8 @@ public final class DependencyResolver {
* @param vectors dependency vectors to add * @param vectors dependency vectors to add
* @since 1-alpha1 * @since 1-alpha1
*/ */
public DependencyResolver addVectors(@NotNull List<@NotNull DependencyVector> vectors) { public DependencyResolver addVectors(@NotNull List<? extends @NotNull DependencyVector> vectors) {
this.vectors = vectors; this.vectors.addAll(vectors);
return this; return this;
} }
@ -84,7 +95,29 @@ public final class DependencyResolver {
* @param vectors dependency vectors to add * @param vectors dependency vectors to add
* @since 1-alpha1 * @since 1-alpha1
*/ */
public DependencyResolver addVectors(@NotNull Set<@NotNull DependencyVector> vectors) { public DependencyResolver addVectors(@NotNull ImmutableArrayList<? extends @NotNull DependencyVector> vectors) {
this.vectors.addAll(vectors);
return this;
}
/**
* Adds multiple dependency vectors.
*
* @param vectors dependency vectors to add
* @since 1-alpha1
*/
public DependencyResolver addVectors(@NotNull ImmutableLinkedList<? extends @NotNull DependencyVector> vectors) {
this.vectors.addAll(vectors);
return this;
}
/**
* Adds multiple dependency vectors.
*
* @param vectors dependency vectors to add
* @since 1-alpha1
*/
public DependencyResolver addVectors(@NotNull Set<? extends @NotNull DependencyVector> vectors) {
this.vectors.addAll(vectors); this.vectors.addAll(vectors);
return this; return this;
} }