Package org.xwiki.rendering.block
Class WordBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.WordBlock
-
public class WordBlock extends AbstractBlock
Represents a word.- Since:
- 1.5M2
- Version:
- $Id: ad2e8151f62ddd4d66b60b30b307186569f1fe21 $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.block.Block
LIST_BLOCK_TYPE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetWord()inthashCode()StringtoString()voidtraverse(Listener listener)Let the block sendListenerevents corresponding to its content.-
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, after, before, clone, clone, getBlocks, getChildren, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getPreviousSibling, getRoot, indexOf, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
-
-
-
-
Constructor Detail
-
WordBlock
public WordBlock(String word)
- Parameters:
word- the word wrapped by this block. Note that this is supposed to be a single word and space or special symbols should be represented by other blocks
-
-
Method Detail
-
traverse
public void traverse(Listener listener)
Description copied from interface:BlockLet the block sendListenerevents corresponding to its content. For example a Paragraph block will send theListener.beginParagraph(java.util.Map<java.lang.String, java.lang.String>)andListener.endParagraph(java.util.Map<java.lang.String, java.lang.String>)events when this method is called.- Specified by:
traversein interfaceBlock- Overrides:
traversein classAbstractBlock- Parameters:
listener- the listener to which to send the events to.
-
getWord
public String getWord()
- Returns:
- the word wrapped by this block
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractBlock
-
-