All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.firebus.utils.FirebusJSArray Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package io.firebus.utils;

import java.util.ArrayList;

public class FirebusJSArray //extends AbstractJSObject
{
	protected ArrayList list;
	
	public FirebusJSArray()
	{
		list = new ArrayList();
	}
/*	
	public FirebusJSArray(ScriptObject na)
	{
		list = new ArrayList();
		for(int i = 0; i < (Integer)na.getLength(); i++)
			list.add(na.get(i));
	}
	
	public String getClassName()
	{
		return "Array";
	}

	public Object getMember(String arg0)
	{
		if(arg0.equals("length"))
			return list.size();
		else
			return null;
	}

	public Object getSlot(int arg0)
	{
		return list.get(arg0);
	}

	public boolean hasSlot(int arg0)
	{
		return list.size() > arg0;
	}

	public boolean isArray()
	{
		return true;
	}

	public void setSlot(int arg0, Object arg1)
	{
		list.add(arg0, arg1);
	}

	public Collection values()
	{
		return list;
	}
	*/

}