Hello Michael, This looks interesting. However, Ant 1.x must work with a 1.1 JVM so you can't use HashMap, etc. Ant 2 is another matter but there's no tree to patch against yet :) .
-Bill Michael McCallum wrote: > > Here it goes. > > Has both the filterset type and the patch. This also includes the > addition of conditionals to Exit. ie if/unless. > > Michael > <snip/> > // java util classes > import java.util.Enumeration; > import java.util.HashMap; > import java.util.Properties; > import java.util.Vector; > > // ant classes > import org.apache.tools.ant.BuildException; > import org.apache.tools.ant.Project; > import org.apache.tools.ant.Task; > > /** > * A set of filters to be applied to something. > * > * @author <A href="mailto:[EMAIL PROTECTED]">Michael McCallum</A> > * @created 14 March 2001 > */ > public class FilterSet extends DataType { > public final static String TOKEN_START = "@"; > public final static String TOKEN_END = "@"; > <snip/> > /** > * Gets the filter hash of the FilterSet. > * > * @return The hash of the tokens and values for quick lookup. > */ > private HashMap getFilterHash() { > HashMap filterHash = new HashMap( filters_.size() ); > for( int filterCounter = 0; filterCounter < filters_.size(); > filterCounter++ ) { > Filter filter = ( Filter ) filters_.elementAt( filterCounter ); > filterHash.put( filter.getToken(), filter.getValue() ); > } > return filterHash; > }
