# Function Class

> A function is a process.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Function
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class Function
```

**Namespace:** `com::datalogics::PDFL`

**Derived classes:** [`ExponentialFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ExponentialFunction.md), [`NamedFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/NamedFunction.md), [`PostScriptCalculatorFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/PostScriptCalculatorFunction.md)

## Description

A function is a process. A function takes input values and manipulates them to create output values.

**Referenced by:** [`AxialShadingPattern`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/AxialShadingPattern.md), [`DeviceNColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/DeviceNColorSpace.md), [`ExponentialFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ExponentialFunction.md), [`ExtendedGraphicState`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/ExtendedGraphicState.md), [`Function`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Function.md), [`FunctionPtrVector`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/FunctionPtrVector.md), [`NamedFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/NamedFunction.md), [`PostScriptCalculatorFunction`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/PostScriptCalculatorFunction.md), [`SeparationColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/SeparationColorSpace.md)

**Uses types:** [`Function`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Function.md)

## Fields

### DEFAULT

```java
static final Function com.datalogics.PDFL.Function.DEFAULT
```

*static*

The Default named function.

### IDENTITY

```java
static final Function com.datalogics.PDFL.Function.IDENTITY
```

*static*

The Identity named function, which returns its input values unchanged.

## Methods

### apply

```java
java.util.List< Double > com.datalogics.PDFL.Function.apply(java.util.List< Double > args)
```

**Parameters**

- `args` (`java.util.List< Double >`): input values for the function. The number of input values must agree with the number of inputs the function takes.

**Returns:** `java.util.List< Double >`

a list of the result values from the function

Apply the function to supplied input values

### delete

```java
synchronized void com.datalogics.PDFL.Function.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.Function.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.Function.finalize()
```

*protected*

**Returns:** `void`

### getDomain

```java
java.util.List< Double > com.datalogics.PDFL.Function.getDomain()
```

**Returns:** `java.util.List< Double >`

The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.

### getNInputs

```java
int com.datalogics.PDFL.Function.getNInputs()
```

**Returns:** `int`

The number of inputs to the function.

### getNOutputs

```java
int com.datalogics.PDFL.Function.getNOutputs()
```

**Returns:** `int`

The number of outputs from the function.

### getRange

```java
java.util.List< Double > com.datalogics.PDFL.Function.getRange()
```

**Returns:** `java.util.List< Double >`

The range of the function. Contains 2 * n elements, where n is the number of outputs from the function. Each successive pair of elements gives the minimum and maximum values for one of the outputs. Output values from the function are clamped to these minimum and maximum values.

### setDomain

```java
void com.datalogics.PDFL.Function.setDomain(java.util.List< Double > domain)
```

**Parameters**

- `domain` (`java.util.List< Double >`)

**Returns:** `void`

The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.

### setRange

```java
void com.datalogics.PDFL.Function.setRange(java.util.List< Double > range)
```

**Parameters**

- `range` (`java.util.List< Double >`)

**Returns:** `void`

The range of the function. Contains 2 * n elements, where n is the number of outputs from the function. Each successive pair of elements gives the minimum and maximum values for one of the outputs. Output values from the function are clamped to these minimum and maximum values.

### toString

```java
String com.datalogics.PDFL.Function.toString()
```

**Returns:** `String`

A string representation of the function.

Convert the function to a displayable string.
