Overview | Package | Class | Tree | Deprecated | Index | Help
| Groovy JDK

## primitive-types
Class float[]

Method Summary
`Number` | `count(Object value)` Counts the number of occurrences of the given value inside this array.
`Collection` | `flatten()` Flatten an array.
`List` | `getAt(Range range)` Support the subscript operator with a range for a float array
`List` | `getAt(IntRange range)` Support the subscript operator with an IntRange for a float array
`List` | `getAt(ObjectRange range)` Support the subscript operator with an ObjectRange for a float array
`List` | `getAt(Collection indices)` Support the subscript operator with a collection for a float array
`int` | `size()` Allows arrays to behave similar to collections.
`List` | `toList()` Converts this array to a List of the same size, with each element added to the list.
`String` | `toString()` Returns the string representation of the given array.

Method Detail

### count

    public Number count(Object value)

  Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0` or `equals(value)` ).

Parameters:
  `value` - the value being searched for.

Returns:
  the number of occurrences

Since:
  1.6.4

### flatten

    public Collection flatten()

  Flatten an array. This array and any nested arrays or collections have their contents (recursively) added to the new collection.

Returns:
  a flattened Collection

Since:
  1.6.0

### getAt

    public List getAt(Range range)

  Support the subscript operator with a range for a float array

Parameters:
  `range` - a range indicating the indices for the items to retrieve.

Returns:
  list of the retrieved floats

Since:
  1.0

### getAt

    public List getAt(IntRange range)

  Support the subscript operator with an IntRange for a float array

Parameters:
  `range` - an IntRange indicating the indices for the items to retrieve.

Returns:
  list of the retrieved floats

Since:
  1.0

### getAt

    public List getAt(ObjectRange range)

  Support the subscript operator with an ObjectRange for a float array

Parameters:
  `range` - an ObjectRange indicating the indices for the items to retrieve.

Returns:
  list of the retrieved floats

Since:
  1.0

### getAt

    public List getAt(Collection indices)

  Support the subscript operator with a collection for a float array

Parameters:
  `indices` - a collection of indices for the items to retrieve.

Returns:
  list of the floats at the given indices

Since:
  1.0

### size

    public int size()

  Allows arrays to behave similar to collections.

Returns:
  the length of the array

Since:
  1.0

See:
  Array#getLength(Object).

### toList

    public List toList()

  Converts this array to a List of the same size, with each element added to the list.

Returns:
  a list containing the contents of this array.

Since:
  1.0

### toString

    public String toString()

  Returns the string representation of the given array.

Returns:
  the string representation

Since:
  1.6.0

Overview | Package | Class | Tree | Deprecated | Index | Help
| Groovy JDK