public class BlockNavigator extends Object
Constructor and Description |
---|
BlockNavigator()
The default matcher does not filter anything.
|
BlockNavigator(BlockMatcher matcher) |
Modifier and Type | Method and Description |
---|---|
<T extends Block> |
getBlocks(Block currentBlock,
Block.Axes currentAxes)
Get all blocks following provided
BlockMatcher and Block.Axes . |
<T extends Block> |
getFirstBlock(Block currentBlock,
Block.Axes currentAxes)
Get the first matched block in the provided
Block.Axes . |
public BlockNavigator()
public BlockNavigator(BlockMatcher matcher)
matcher
- used to filter the result of the various methodspublic <T extends Block> List<T> getBlocks(Block currentBlock, Block.Axes currentAxes)
BlockMatcher
and Block.Axes
.T
- the class of the Blocks to returncurrentBlock
- the block to start searching fromcurrentAxes
- indicate the search axesBlock
s, empty list of none was foundpublic <T extends Block> T getFirstBlock(Block currentBlock, Block.Axes currentAxes)
Block.Axes
.T
- the class of the Block to returncurrentBlock
- the block to start searching fromcurrentAxes
- indicate the search axesBlock
, null if none was foundCopyright © 2004–2021 XWiki. All rights reserved.