com.itextpdf.text.pdf
Class SequenceList
java.lang.Object
com.itextpdf.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.
Field Summary |
protected static int |
COMMA
|
protected static int |
END
|
protected static char |
EOT
|
protected boolean |
even
|
protected int |
high
|
protected boolean |
inverse
|
protected int |
low
|
protected static int |
MINUS
|
protected static int |
NOT
|
protected int |
number
|
protected static int |
NUMBER
|
protected boolean |
odd
|
protected String |
other
|
protected int |
ptr
|
protected char[] |
text
|
protected static int |
TEXT
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
text
protected char[] text
ptr
protected int ptr
number
protected int number
other
protected String other
low
protected int low
high
protected int high
odd
protected boolean odd
even
protected boolean even
inverse
protected boolean inverse
SequenceList
protected SequenceList(String range)
nextChar
protected char nextChar()
putBack
protected void putBack()
getType
protected int getType()
getAttributes
protected boolean getAttributes()
expand
public static List<Integer> expand(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
Copyright © 2015. All Rights Reserved.