package com.openrules.forms.gui.impl;

import java.util.ArrayList;

public class Options extends ArrayList 
{
    private String id;
    
    public Options(String id)
	{
		super(5);
		this.id = id;
	}
    
	public Options(String[] strings) 
	{
		for(int i=0; i < strings.length; i++)
			addOption(new Option(strings[i]));
	}

	public Option getOption(int i)
	{
		return (Option) get(i);
	}

	public int getLength()
	{
		return size();
	}

	public void addOption(Option s)
	{
		add(s);
	}
	
	public void deleteOption(Option s)
	{
		remove(s); 
	}
	
	public void deleteOption(String s)
	{
	    Option o = findOption(s);
		if (o != null )
		    deleteOption(o);
	}
	
	public Option findOption(String s)
	{
		for(int i=0; i