public class FilePatternBlock
extends java.lang.Object
FilePattern
.Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
begin |
private java.lang.String |
block
String representation of this block.
|
static java.lang.String |
BLOCK_END
Identifies the end of a block.
|
static java.lang.String |
BLOCK_START
Identifies the start of a block.
|
private java.lang.String[] |
elements
Elements within this block, e.g.
|
private java.math.BigInteger |
end |
private boolean |
fixed
Whether or not this is a fixed-width block.
|
private boolean |
numeric
Whether or not this is a numeric block.
|
private java.math.BigInteger |
step |
private int |
zeroes
The number of leading zeroes.
|
Constructor and Description |
---|
FilePatternBlock(java.lang.String block)
Builds a FilePatternBlock from a block string.
|
Modifier and Type | Method and Description |
---|---|
private void |
explode() |
java.lang.String |
getBlock()
Gets the block string.
|
java.lang.String[] |
getElements()
Gets all block elements.
|
java.math.BigInteger |
getFirst()
Gets the first element in a range block.
|
java.math.BigInteger |
getLast()
Gets the last element in a range block.
|
java.math.BigInteger |
getStep()
Gets the difference between consecutive elements in a range block.
|
boolean |
isFixed()
Whether or not this is a fixed-width block.
|
boolean |
isNumeric()
Whether or not this is a numeric block.
|
private void |
setFixed() |
private void |
setNumeric() |
private void |
throwBadBlock(java.lang.String msgTemplate) |
private void |
throwBadBlock(java.lang.String msgTemplate,
java.lang.Throwable cause) |
public static final java.lang.String BLOCK_START
public static final java.lang.String BLOCK_END
private java.lang.String[] elements
private boolean fixed
private boolean numeric
private int zeroes
private java.lang.String block
private java.math.BigInteger begin
private java.math.BigInteger end
private java.math.BigInteger step
public FilePatternBlock(java.lang.String block)
FilePattern
for block string syntax.block
- the block string.public java.lang.String[] getElements()
public java.lang.String getBlock()
public boolean isFixed()
public boolean isNumeric()
<10-15:2>
expands to 10, 13,
15
, all of which consist only of digits.public java.math.BigInteger getFirst()
public java.math.BigInteger getLast()
public java.math.BigInteger getStep()
private void throwBadBlock(java.lang.String msgTemplate)
private void throwBadBlock(java.lang.String msgTemplate, java.lang.Throwable cause)
private void setNumeric()
private void setFixed()
private void explode()
Copyright © 2020 Open Microscopy Environment