public class Util { /** Set all elements of a to the value v; return a. */ public static <T> T[] fill(T[] a, T v) { for(int i = 0; i < a.length; i++) a[i] = v; return a; } }