Package org.xwiki.rendering.block
Class IdBlock
- java.lang.Object
-
- org.xwiki.rendering.block.AbstractBlock
-
- org.xwiki.rendering.block.IdBlock
-
public class IdBlock extends AbstractBlock
A reference/location in a page. In HTML for example this is called an Anchor. It allows pointing to that location, for example in links.- Since:
- 1.6M1
- Version:
- $Id: 774ad6bcf5531d6530d570414d054ea86a2f48f8 $
- See Also:
Listener.onId(String)
-
-
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)StringgetName()inthashCode()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
-
IdBlock
public IdBlock(String name)
- Parameters:
name- the unique name for the reference/location.
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the reference/location name
-
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.
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractBlock
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractBlock
-
-