package com.jxml.quick.qmap;
import java.util.*;

/**
 * Returns false if any qualifier in the list returns false.
 */
public class QQualifierItemEqualsGrantor implements QQualifier
{
	public int ndx;
	public String value;

	public QQualifierItemEqualsGrantor(){}

	public QQualifierItemEqualsGrantor(int ndx, String value)
	{
		this.ndx=ndx;
		this.value=value;
	}

	public boolean acceptable(QIndexedComparableList icl)
	{
		String item=(String)icl.keyList.get(ndx);
		if("".equals(value))
		{
			return true;
		}
		else if(item.equals(value))
		{
				return true;
		}
		else
		 return false;
	}
}