Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.common

public Class PDRange

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSArray, .COSBase, .COSFloat, .COSNumber

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

Field Summary

Modifier and TypeField and Description
private final COSArray
private int

Constructor Summary

AccessConstructor and Description
public
PDRange()

Constructor with an initial range of 0..1.

public
PDRange(COSArray
The array that describes the range.
range
)

Constructor assumes a starting index of 0.

public
PDRange(COSArray
The array that describes the index
range
,
int
The range index into the array for the start of the range.
index
)

Constructor with an index into an array.

Method Summary

Modifier and TypeMethod and Description
public COSArray

Returns:

The cos object that this object wraps.
getCOSArray
()

This will get the underlying array value.

public COSBase

Returns:

The cos object that matches this Java object.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public float

Returns:

The max value.
getMax
()

This will get the maximum value of the range.

public float

Returns:

The min value.
getMin
()

This will get the minimum value of the range.

public void
setMax(float
The new maximum for the range.
max
)

This will set the maximum value for the range.

public void
setMin(float
The new minimum for the range.
min
)

This will set the minimum value for the range.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

rangeArrayback to summary
private final COSArray rangeArray
startingIndexback to summary
private int startingIndex

Constructor Detail

PDRangeback to summary
public PDRange()

Constructor with an initial range of 0..1.

PDRangeback to summary
public PDRange(COSArray range)

Constructor assumes a starting index of 0.

Parameters
range:COSArray

The array that describes the range.

PDRangeback to summary
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, 1 ).

Parameters
range:COSArray

The array that describes the index

index:int

The range index into the array for the start of the range.

Method Detail

getCOSArrayback to summary
public COSArray getCOSArray()

This will get the underlying array value.

Returns:COSArray

The cos object that this object wraps.

getCOSObjectback to summary
public COSBase getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSBase

The cos object that matches this Java object.

Annotations
@Override
getMaxback to summary
public float getMax()

This will get the maximum value of the range.

Returns:float

The max value.

getMinback to summary
public float getMin()

This will get the minimum value of the range.

Returns:float

The min value.

setMaxback to summary
public void setMax(float max)

This will set the maximum value for the range.

Parameters
max:float

The new maximum for the range.

setMinback to summary
public void setMin(float min)

This will set the minimum value for the range.

Parameters
min:float

The new minimum for the range.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override