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
Class PDRange

    java.lang.Object
      org.pdfbox.pdmodel.common.PDRange

All Implemented Interfaces:
  COSObjectable

public class PDRange
extends Object
implements COSObjectable

This class will be used to signify a range. a(min) <= a* <= a(max)

Version:
  $Revision: 1.2 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Constructor Summary
`PDRange()` Constructor with an initial range of 0..1.
`PDRange(COSArray range)` Constructor assumes a starting index of 0.
`PDRange(COSArray range, int index)` Constructor with an index into an array.

Method Summary
`COSArray` | `getCOSArray()` This will get the underlying array value.
`COSBase` | `getCOSObject()` Convert this standard java object to a COS object.
`float` | `getMax()` This will get the maximum value of the range.
`float` | `getMin()` This will get the minimum value of the range.
`void` | `setMax(float max)` This will set the maximum value for the range.
`void` | `setMin(float min)` This will set the minimum value for the range.

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

Constructor Detail

### PDRange

    public PDRange()

  Constructor with an initial range of 0..1.

### PDRange

    public PDRange(COSArray range)

  Constructor assumes a starting index of 0.

Parameters:
  `range` - The array that describes the range.

### PDRange

    public PDRange(COSArray range,
                   int index)

  Constructor with an index into an array. Because some arrays specify multiple ranges ie [ 0,1, 0,2, 2,3 ] It is convenient for this class to take an index into an array. So if you want this range to represent 0,2 in the above example then you would say `new PDRange( array, 2 )`.

Parameters:
  `range` - The array that describes the index
  `index` - The index into the array for the start of the range.

Method Detail

### getCOSObject

    public COSBase getCOSObject()

  Convert this standard java object to a COS object.

  Specified by:
    `getCOSObject` in interface `COSObjectable`
  Returns:
    The cos object that matches this Java object.

### getCOSArray

    public COSArray getCOSArray()

  This will get the underlying array value.

  Returns:
    The cos object that this object wraps.

### getMin

    public float getMin()

  This will get the minimum value of the range.

  Returns:
    The min value.

### setMin

    public void setMin(float min)

  This will set the minimum value for the range.

  Parameters:
    `min` - The new minimum for the range.

### getMax

    public float getMax()

  This will get the maximum value of the range.

  Returns:
    The max value.

### setMax

    public void setMax(float max)

  This will set the maximum value for the range.

  Parameters:
    `max` - The new maximum for the range.

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