org.apache.pdfbox.pdmodel.common.function

## Class PDFunctionTypeIdentity

- java.lang.Object
- - org.apache.pdfbox.pdmodel.common.function.PDFunction
  - - org.apache.pdfbox.pdmodel.common.function.PDFunctionTypeIdentity

All Implemented Interfaces:
  COSObjectable

    public class PDFunctionTypeIdentity
    extends PDFunction

The identity function.

Author:
  Tilman Hausherr

### Constructor Summary

Constructors
Constructor and Description
`PDFunctionTypeIdentity(COSBase function)`

### Method Summary

All Methods Instance Methods Concrete Methods
`float[]` `eval(float[] input)` Evaluates the function at the given input.
`int` `getFunctionType()` Returns the function type.
`protected COSArray` `getRangeValues()` Returns all ranges for the output values as COSArray .
`String` `toString()`

### Methods inherited from class org.apache.pdfbox.pdmodel.common.function.PDFunction

`clipToRange, clipToRange, create, getCOSObject, getDomainForInput, getNumberOfInputParameters, getNumberOfOutputParameters, getPDStream, getRangeForOutput, interpolate, setDomainValues, setRangeValues`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### PDFunctionTypeIdentity

    public PDFunctionTypeIdentity(COSBase function)

### Method Detail

#### getFunctionType

    public int getFunctionType()

Description copied from class: `PDFunction`
Returns the function type. Possible values are: 0 - Sampled function 2 - Exponential interpolation function 3 - Stitching function 4 - PostScript calculator function

Specified by:
  `getFunctionType` in class `PDFunction`
Returns:
  the function type.

#### eval

    public float[] eval(float[] input)
                 throws IOException

Description copied from class: `PDFunction`
Evaluates the function at the given input. ReturnValue = f(input)

Specified by:
  `eval` in class `PDFunction`
Parameters:
  `input` - The array of input values for the function. In many cases will be an array of a single value, but not always.
Returns:
  The of outputs the function returns based on those inputs. In many cases will be an array of a single value, but not always.
Throws:
  `IOException` - if something went wrong processing the function.

#### getRangeValues

    protected COSArray getRangeValues()

Description copied from class: `PDFunction`
Returns all ranges for the output values as COSArray . Required for type 0 and type 4 functions

Overrides:
  `getRangeValues` in class `PDFunction`
Returns:
  the ranges array.

#### toString

    public String toString()

Overrides:
  `toString` in class `PDFunction`