javax.print.attribute.standard

Class PageRanges

public final class PageRanges extends SetOfIntegerSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute

The PageRanges printing attribute specifies the range(s) of pages to be printed in a print job.

Note: The effect of this attribute on jobs with multiple documents is controlled by the job attribute {@link javax.print.attribute.standard.MultipleDocumentHandling}.

IPP Compatibility: PageRanges is an IPP 1.1 attribute.

Constructor Summary
PageRanges(int member)
Constructs a PageRanges object with only one page to be printed.
PageRanges(int[][] members)
Constructs a PageRanges object with a set of ranges to be printed.
PageRanges(int lowerBound, int upperBound)
Constructs a PageRanges object with the given single range of pages to be printed.
PageRanges(String members)
Constructs a PageRanges object with a set of ranges to be printed in string array form.
Method Summary
booleanequals(Object obj)
Tests if the given object is equal to this object.
Class<? extends Attribute>getCategory()
Returns category of this class.
StringgetName()
Returns the name of this attribute.

Constructor Detail

PageRanges

public PageRanges(int member)
Constructs a PageRanges object with only one page to be printed.

Parameters: member the only page to be printed.

Throws: IllegalArgumentException if member is < 1

PageRanges

public PageRanges(int[][] members)
Constructs a PageRanges object with a set of ranges to be printed.

Parameters: members the page ranges to be printed.

Throws: IllegalArgumentException if any element is invalid NullPointerException if members is null or any element of members is null.

PageRanges

public PageRanges(int lowerBound, int upperBound)
Constructs a PageRanges object with the given single range of pages to be printed.

Parameters: lowerBound the lower bound value upperBound the upper bound value

Throws: IllegalArgumentException if lowerBound <= upperbound and lowerBound < 1

PageRanges

public PageRanges(String members)
Constructs a PageRanges object with a set of ranges to be printed in string array form.

Parameters: members the page ranges to be printed in string form.

Throws: IllegalArgumentException if any element is invalid. NullPointerException if members is null or any element of members is null.

Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object.

Parameters: obj the object to test

Returns: true if both objects are equal, false otherwise.

getCategory

public Class<? extends Attribute> getCategory()
Returns category of this class.

Returns: The class PageRanges itself.

getName

public String getName()
Returns the name of this attribute.

Returns: The name "page-ranges".