package com.jxml.quick.config;
import com.jxml.quick.*;
import com.jxml.protocol.*;
import org.xml.sax.*;
import java.io.*;
import java.util.*;

public class NVItem implements Item
{
	public String name;
	public String fieldLength;
	public String value="";
        public boolean fixed;
	public void eval(Map properties, List args, ClassLoader cl)
	{
		String pattern="-" + name;
		int i,s;
		s=args.size();
		for(i=0;i<s;i++)
		{
			if((args.get(i)).equals(pattern))
			{
				if (fixed)
				{
	                        	properties.put(name,value);
				}
				else
				{
	                        	properties.put(name,args.get(i+1));
				}
				args.remove(i+1);
				args.remove(i);
				return;
					
			}
		}
		if ("".equals(value) && properties.containsKey(name))
			return;
		properties.put(name,value);
	}
}