package com.jxml.quick.examples.timesheet;
import com.jxml.quick.*;
import java.util.*;

public class Day implements QAware
{
	public Date date=new Date(0);
	public ArrayList entries=new ArrayList();
	private HashMap hEntries=new HashMap();

	/**
	 * Called when end-tag is parsed
	 */
	public void endElement(String tagName, QContext context)
		throws QPE
	{
		int s=entries.size();
		int i;
		for (i=0;i<s;++i)
		{
			Entry rv=(Entry)entries.get(i);
			if (hEntries.put(rv.project,rv)!=null)
				context.throwPE("Duplicate project: "+rv.project);
		}
	}

	public Entry getEntry(String project)
	{
		return (Entry)hEntries.get(project);
	}
}
