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

org.gwtopenmaps.openlayers.client.util.JArrayBase Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package org.gwtopenmaps.openlayers.client.util;


/**
 * Base class for classes wrapping Javascript arrays.
 *
 * Get and set methods are implemented in subclasses, to make sure
 * they get and set the correct type of array element.
 *
 */
public class JArrayBase extends JSObjectWrapper {

	protected JArrayBase(JSObject element)
	{
		super(element);
	}

	public static JArrayBase narrowToJArray(JSObject element)
	{
		return (element == null)?null: new JArrayBase(element);
	}

	protected JArrayBase(int length)
	{
		this(JArrayBaseImpl.create(length));
	}

	public int length()
	{
		return JArrayBaseImpl.arrayLength(getJSObject());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy