Package loci.formats
Class FilePatternBlock
java.lang.Object
loci.formats.FilePatternBlock
FilePatternBlock represents a single block in a
FilePattern.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilePatternBlock(String block) Builds a FilePatternBlock from a block string. -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()Gets the block string.String[]Gets all block elements.getFirst()Gets the first element in a range block.getLast()Gets the last element in a range block.getStep()Gets the difference between consecutive elements in a range block.booleanisFixed()Whether or not this is a fixed-width block.booleanWhether or not this is a numeric block.
-
Field Details
-
BLOCK_START
Identifies the start of a block.- See Also:
-
BLOCK_END
Identifies the end of a block.- See Also:
-
-
Constructor Details
-
FilePatternBlock
Builds a FilePatternBlock from a block string. SeeFilePatternfor block string syntax.- Parameters:
block- the block string.
-
-
Method Details
-
getElements
Gets all block elements.- Returns:
- an array containing all block elements.
-
getBlock
Gets the block string.- Returns:
- the block string.
-
isFixed
public boolean isFixed()Whether or not this is a fixed-width block. All elements in a fixed-width block have the same length (numbers are zero-padded as needed).- Returns:
- true if this is a fixed-width block, false otherwise.
-
isNumeric
public boolean isNumeric()Whether or not this is a numeric block. All elements in a numeric block consist of digit characters. For instance,<10-15:2>expands to10, 13, 15, all of which consist only of digits.- Returns:
- true if this is a numeric block, false otherwise.
-
getFirst
Gets the first element in a range block.- Returns:
- the first block element
-
getLast
Gets the last element in a range block.- Returns:
- the last block element
-
getStep
Gets the difference between consecutive elements in a range block.- Returns:
- the step element as defined above.
-