package hudson.matrix; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; /** * List of {@link Axis}. * * @author Kohsuke Kawaguchi */ public class AxisList extends ArrayList { public AxisList() { } public AxisList(Collection c) { super(c); } public Axis find(String name) { for (Axis a : this) { if(a.name.equals(name)) return a; } return null; } /** * List up all the possible combinations of this list. */ public Iterable list() { final int[] base = new int[size()]; int b = 1; for( int i=size()-1; i>=0; i-- ) { base[i] = b; b *= get(i).size(); } final int total = b; // number of total combinations return new Iterable() { public Iterator iterator() { return new Iterator() { private int counter = 0; public boolean hasNext() { return counter