Package com.itextpdf.text.pdf
Class SequenceList
- java.lang.Object
-
- com.itextpdf.text.pdf.SequenceList
-
public class SequenceList extends java.lang.ObjectThis 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-endYou 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intCOMMAprivate static intDIGITprivate static intDIGIT2protected static intENDprotected static charEOTprotected booleanevenprivate static intFIRSTprotected inthighprotected booleaninverseprotected intlowprotected static intMINUSprotected static intNOTprivate static java.lang.StringNOT_OTHERprotected intnumberprotected static intNUMBERprotected booleanoddprotected java.lang.Stringotherprivate static intOTHERprotected intptrprotected char[]textprotected static intTEXT
-
Constructor Summary
Constructors Modifier Constructor Description protectedSequenceList(java.lang.String range)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.Integer>expand(java.lang.String ranges, int maxNumber)Generates a list of numbers from a string.protected booleangetAttributes()protected intgetType()protected charnextChar()private voidotherProc()protected voidputBack()
-
-
-
Field Detail
-
COMMA
protected static final int COMMA
- See Also:
- Constant Field Values
-
MINUS
protected static final int MINUS
- See Also:
- Constant Field Values
-
NOT
protected static final int NOT
- See Also:
- Constant Field Values
-
TEXT
protected static final int TEXT
- See Also:
- Constant Field Values
-
NUMBER
protected static final int NUMBER
- See Also:
- Constant Field Values
-
END
protected static final int END
- See Also:
- Constant Field Values
-
EOT
protected static final char EOT
- See Also:
- Constant Field Values
-
FIRST
private static final int FIRST
- See Also:
- Constant Field Values
-
DIGIT
private static final int DIGIT
- See Also:
- Constant Field Values
-
OTHER
private static final int OTHER
- See Also:
- Constant Field Values
-
DIGIT2
private static final int DIGIT2
- See Also:
- Constant Field Values
-
NOT_OTHER
private static final java.lang.String NOT_OTHER
- See Also:
- Constant Field Values
-
text
protected char[] text
-
ptr
protected int ptr
-
number
protected int number
-
other
protected java.lang.String other
-
low
protected int low
-
high
protected int high
-
odd
protected boolean odd
-
even
protected boolean even
-
inverse
protected boolean inverse
-
-
Method Detail
-
nextChar
protected char nextChar()
-
putBack
protected void putBack()
-
getType
protected int getType()
-
otherProc
private void otherProc()
-
getAttributes
protected boolean getAttributes()
-
expand
public static java.util.List<java.lang.Integer> expand(java.lang.String ranges, int maxNumber)Generates a list of numbers from a string.- Parameters:
ranges- the comma separated rangesmaxNumber- the maximum number in the range- Returns:
- a list with the numbers as
Integer
-
-