com.lowagie.text.pdf
Class SequenceList

java.lang.Object
  extended bycom.lowagie.text.pdf.SequenceList

public class SequenceList
extends Object

This class expands a string into a list of numbers. The main use is to select a range of pages.

The general syntax is:
[!][o][odd][e][even]start-end

You can have multiple ranges separated by commas ','. The '!' modifier removes the range from what is already selected. The range changes are incremental, that is, numbers are added or deleted as the range appears. The start or the end, but not both, can be omitted.


Method Summary
static List expand(String ranges, int maxNumber)
          Generates a list of numbers from a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

expand

public static List expand(String ranges,
                          int maxNumber)
Generates a list of numbers from a string.

Parameters:
ranges - the comma separated ranges
maxNumber - the maximum number in the range
Returns:
a list with the numbers as Integer


Copyright © 2011 EGIZ - E-Government Innovation Center. All Rights Reserved.