Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.common.function
Class PDFunction

    java.lang.Object
      org.pdfbox.pdmodel.common.function.PDFunction

All Implemented Interfaces:
  COSObjectable

Direct Known Subclasses:
  PDDictionaryFunction, PDStreamFunction

public abstract class PDFunction
extends Object
implements COSObjectable

This class represents a function in a PDF document.

Version:
  $Revision: 1.3 $
Author:
  Ben Litchfield

Constructor Summary
`PDFunction()`

Method Summary
`static PDFunction` | `create(COSBase function)` Create the correct PD Model function based on the COS base function.
`abstract PDRange` | `getDomainForInput(int n)` This will get the range for a certain input parameter.
`abstract int` | `getNumberOfInputParameters()` This will get the number of input parameters that have a domain specified.
`abstract int` | `getNumberOfOutputParameters()` This will get the number of output parameters that have a range specified.
`abstract PDRange` | `getRangeForOutput(int n)` This will get the range for a certain output parameters.
`abstract void` | `setDomainForInput(PDRange range, int n)` This will set the domain for the input values.
`abstract void` | `setRangeForOutput(PDRange range, int n)` This will set the a range for output parameter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.pdfbox.pdmodel.common.COSObjectable
`getCOSObject`

Constructor Detail

### PDFunction

    public PDFunction()

Method Detail

### create

    public static PDFunction create(COSBase function)
                             throws IOException

  Create the correct PD Model function based on the COS base function.

  Parameters:
    `function` - The COS function dictionary.
  Returns:
    The PDModel Function object.
  Throws:
    `IOException` - If we are unable to create the PDFunction object.

### getNumberOfOutputParameters

    public abstract int getNumberOfOutputParameters()

  This will get the number of output parameters that have a range specified. A range for output parameters is optional so this may return zero for a function that does have output parameters, this will simply return the number that have the rnage specified.

  Returns:
    The number of input parameters that have a range specified.

### getRangeForOutput

    public abstract PDRange getRangeForOutput(int n)

  This will get the range for a certain output parameters. This is will never return null. If it is not present then the range 0 to 0 will be returned.

  Parameters:
    `n` - The output parameter number to get the range for.
  Returns:
    The range for this component.

### setRangeForOutput

    public abstract void setRangeForOutput(PDRange range,
                                           int n)

  This will set the a range for output parameter.

  Parameters:
    `range` - The new range for the output parameter.
    `n` - The ouput parameter number to set the range for.

### getNumberOfInputParameters

    public abstract int getNumberOfInputParameters()

  This will get the number of input parameters that have a domain specified.

  Returns:
    The number of input parameters that have a domain specified.

### getDomainForInput

    public abstract PDRange getDomainForInput(int n)

  This will get the range for a certain input parameter. This is will never return null. If it is not present then the range 0 to 0 will be returned.

  Parameters:
    `n` - The parameter number to get the domain for.
  Returns:
    The domain range for this component.

### setDomainForInput

    public abstract void setDomainForInput(PDRange range,
                                           int n)

  This will set the domain for the input values.

  Parameters:
    `range` - The new range for the input.
    `n` - The number of the input parameter to set the domain for.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD