Class Array

    • Constructor Summary

      Constructors 
      Constructor Description
      Array()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isArray​(Object object)
      This method determines whether the passed value is an Array.
      boolean isEmpty()
      Returns true if this array contains no elements.
      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.
      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.
      int length()
      Returns the number of elements in this array.
    • Constructor Detail

      • Array

        public 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:
        true if 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()
        Returns true if this array contains no elements.
        Returns:
        true if 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