Class SequenceList

java.lang.Object
com.gitlab.pdftk_java.com.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 systax 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 ommited.

  • Field Details

  • Constructor Details

    • SequenceList

      protected SequenceList(String range)
  • Method Details

    • nextChar

      protected char nextChar()
    • putBack

      protected void putBack()
    • getType

      protected int getType()
    • otherProc

      private void otherProc()
    • getAttributes

      protected boolean getAttributes()
    • 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