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

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

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


public class JDoubleArray extends JArrayBase {

	protected JDoubleArray(JSObject array) {
		super(array);
	}

	public static JDoubleArray narrowToJDoubleArray(JSObject array){
		return new JDoubleArray(array);
	}

	public double get(int index){
		return JDoubleArrayImpl.get(getJSObject(), index);
	}

	public static JDoubleArray create(double[] doubles){
		JDoubleArray array = JDoubleArray.narrowToJDoubleArray(JSObject.createJSArray());
		for(int i=0, max = doubles.length; i < max;i++){
			array.push(doubles[i]);
		}
		return array;
	}

	public void push(double d){
		JDoubleArrayImpl.push(getJSObject(), d);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy