Class Array
- java.lang.Object
-
- org.pepstock.charba.client.commons.Array
-
- All Implemented Interfaces:
IsJSType
- Direct Known Subclasses:
ArrayCanvas,ArrayChart,ArrayDouble,ArrayDoubleArray,ArrayGradient,ArrayImage,ArrayInteger,ArrayMixedObject,ArrayObject,ArrayPattern,ArrayString,RegExpResult
@JsType(isNative=true, name="Array", namespace="<global>") public abstract class Array extends Object implements IsJSTypeArray object which maps the java script object.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description Array()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisArray(Object object)This method determines whether the passed value is an Array.booleanisEmpty()Returnstrueif this array contains no elements.Stringjoin()Creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas.
If the array has only one item, then that item will be returned without using the separator.Stringjoin(String separator)Creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.
If the array has only one item, then that item will be returned without using the separator.intlength()Returns the number of elements in this array.
-
-
-
Method Detail
-
isArray
public static boolean isArray(Object object)
This method determines whether the passed value is an Array.- Parameters:
object- object to be checked.- Returns:
trueif the value is an Array; otherwise,false.
-
length
@JsProperty(name="length") public final int length()
Returns the number of elements in this array.- Returns:
- the number of elements in this array.
-
isEmpty
@JsOverlay public final boolean isEmpty()
Returnstrueif this array contains no elements.- Returns:
trueif this array contains no elements
-
join
@JsOverlay public final String join()
Creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas.
If the array has only one item, then that item will be returned without using the separator.- Returns:
- a new string by concatenating all of the elements in an array
-
join
@JsOverlay public final String join(String separator)
Creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.
If the array has only one item, then that item will be returned without using the separator.- Parameters:
separator- separator string to apply in the join- Returns:
- a new string by concatenating all of the elements in an array
-
-