# Utilities

## Collect

{% code title="Syntax" %}

```
[%objects%]
[%objects% as %javatype%]
```

{% endcode %}

Creates an array containing the specified objects. Specifying a type determines the component type of the resulting array.

{% hint style="info" %}
The brackets in this syntax are literal, not representing an optional group.
{% endhint %}

## Spread

{% code title="Syntax" %}

```
...%object%
```

{% endcode %}

Returns the contents of a single array, iterable, iterator, or stream.

## Array Value

{% code title="Syntax" %}

```
%array%[%integer%]
```

{% endcode %}

Represents the value at a certain index of an array.

This value may be read from and written to.

{% hint style="info" %}
The brackets in this syntax are literal, not representing an optional group.
{% endhint %}

## Null

{% code title="Syntax" %}

```
null
```

{% endcode %}

Represents `null` in Java. This is different from Skript's `<none>`.

## Bits

{% code title="Syntax" %}

```
[the] (bit %number%|bit(s| range) [from] %number%( to |[ ]-[ ])%number%) of %numbers%
%numbers%'[s] (bit %number%|1¦bit(s| range) [from] %number%( to |[ ]-[ ])%number%)
```

{% endcode %}

Represents a subset of bits from a number.

This value may be read from and written to.

## Raw Expression

{% code title="Syntax" %}

```
[the] raw %objects%
```

{% endcode %}

Returns the underlying object of an expression.

## Members

{% code title="Syntax" %}

```
[the] (fields|methods|constructors) of %objects%
%objects%'[s] (fields|methods|constructors)
```

{% endcode %}

Returns a list of the fields, methods, or constructors of an object, including their modifiers and parameters.

If you need a list of field or method names without modifier or parameter details, see [Member Names](/docs/2.x/basics/utilities.md#member-names).

## Member Names

{% code title="Syntax" %}

```
[the] (field|method) names of %objects%
%objects%'[s] (field|method) names
```

{% endcode %}

Returns a list of the fields or methods of an object.

## Is Instance

{% code title="Syntax" %}

```
%objects% (is|are) [a[n]] instance[s] of %javatypes%
%objects% (is not|isn't|are not|aren't) [a[n]] instance[s] of %javatypes%
```

{% endcode %}

Checks whether objects are instances of the given java types.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://skript-mirror.gitbook.io/docs/2.x/basics/utilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
