Tabnine Logo
JsArrayMixed.length
Code IndexAdd Tabnine to your IDE (free)

How to use
length
method
in
com.google.gwt.core.client.JsArrayMixed

Best Java code snippets using com.google.gwt.core.client.JsArrayMixed.length (Showing top 4 results out of 315)

origin: geosdi/GWT-OpenLayers

/**
 * Gets the contents of the given {@link JsArrayMixed} as a double array.
 *
 * @param o {@link JsArrayMixed}
 * @return double[] if the array is not null, else null
 */
private static double[] getDoubleArray(JsArrayMixed o) {
  if (o != null) {
    double[] a = new double[o.length()];
    for (int i = 0; i < o.length(); i++) {
      a[i] = o.getNumber(i);
    }
    return a;
  } else {
    return null;
  }
}
origin: com.googlecode.gwtquery/gwtquery

/**
 * Execute a function around each object.
 */
public static void each(JsArrayMixed objects, Function f) {
 for (int i = 0, l = objects.length(); i < l; i++) {
  f.f(i, objects.getObject(i));
 }
}
origin: geosdi/GWT-OpenLayers

/**
 * Get the maximum zoomlevel for this layer.
 *
 * @return maximum zoomlevel
 */
public int getMaxZoomLevel() {
  return getMinZoomLevel() + LayerImpl.getResolutions(this.getJSObject()).length() - 1;
}
origin: com.googlecode.gwtquery/gwtquery

/**
 * Wrap a GQuery around an existing javascript element, event, node, nodelist, function or array.
 */
public static GQuery $(JavaScriptObject jso) {
 if (jso == null) {
  return $();
 }
 // Execute a native javascript function like jquery does
 if (JsUtils.isFunction(jso)) {
  new JsUtils.JsFunction(jso).fe();
  return $();
 }
 // Wraps a native array like jquery does
 if (!JsUtils.isWindow(jso) && !JsUtils.isElement(jso) && JsUtils.isArray(jso)) {
  JsArrayMixed c = jso.cast();
  JsNodeArray elms = JsNodeArray.create();
  for (int i = 0; i < c.length(); i++) {
   Object obj = c.getObject(i);
   if (obj instanceof Node) {
    elms.addNode((Node) obj);
   }
  }
  return $(elms);
 }
 return JsUtils.isWindow(jso) ? $(jso.<Element> cast()) :
   JsUtils.isElement(jso) ? $(jso.<Element> cast()) :
     JsUtils.isEvent(jso) ? $(jso.<Event> cast()) :
       JsUtils.isNodeList(jso) ? $(jso.<NodeList<Element>> cast()) :
         $(jso.<Element> cast());
}
com.google.gwt.core.clientJsArrayMixedlength

Javadoc

Gets the length of the array.

Popular methods of JsArrayMixed

  • cast
  • join
  • getObject
    Gets the JavaScriptObject at a given index.
  • getNumber
    Gets the double at a given index.
  • push
    Pushes the given boolean onto the end of the array.
  • set
    Sets the boolean value at a given index. If the index is out of bounds, the value will still be set.

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now