---
schema_version: "1"
id: 5d8252210e2c616d1938cc6bf65de31641c93411c00e3cd342fbc4eac716c207
title: max
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.6/dw-core-functions-max.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.6/dw-core-functions-max
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ebe15c06c1c678abda22e440f9bd3684df6afb8ed088274a717bad477bb57a44
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
# max

## [](#max1)max<T <: Comparable>(@StreamCapable values: Array<T>): T | Null

配列内の最大の ​`Comparable`​ 値を返します。

項目のデータ型は同じである必要があります。同じでない場合、関数はエラーをスローします。配列が空の場合、関数は ​`null`​ を返します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>values</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">入力配列。配列の要素には、サポートされる任意のデータ型を使用できます。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、各入力配列の最大値を返します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
output application/json
---
{ a: max([1, 1000]), b: max([1, 2, 3]), c: max([1.5, 2.5, 3.5]) }
```

#### [](#出力)出力

```JSON
{ "a": 1000, "b": 3, "c": 3.5 }
```