com.almondtools.util.collections.Arrays Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rexlex Show documentation
Show all versions of rexlex Show documentation
Regular expression matchers, searcher, lexers based on deterministic finite automata
package com.almondtools.util.collections;
import java.util.ArrayList;
import java.util.List;
public class Arrays {
private List base;
private Arrays(List base) {
this.base = base;
}
public static Arrays init(int size) {
return new Arrays(new ArrayList(size));
}
public Arrays add(T item) {
base.add(item);
return this;
}
public Arrays addAll(List items) {
base.addAll(items);
return this;
}
@SuppressWarnings("unchecked")
public T[] build() {
return (T[]) base.toArray();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy