public abstract class TextContainer extends TextElement implements TextNode
Modifier and Type | Field and Description |
---|---|
protected List<TextContainer> |
children |
protected TextContainer |
nextSibling |
protected TextContainer |
parent |
protected TextContainer |
prevSibling |
Modifier | Constructor and Description |
---|---|
protected |
TextContainer()
Default constructor for empty text container.
|
protected |
TextContainer(TextElementType type,
List<? extends TextContainer> children)
Construct a container of element type with the specified children.
|
protected |
TextContainer(TextElementType type,
String value)
Construct a container of element type with a specific value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getChildCount()
Get the number of direct children of this node.
|
List<TextContainer> |
getChildren()
Get the ordered list of direct children of this node.
|
static TokenDecoder |
getDecoder() |
static TokenEncoder |
getEncoder() |
ListIterator<TextContainer> |
getIterator()
Get an iterator over all descendants of this node including this node.
|
ListIterator<TextContainer> |
getIterator(TextElementType type)
Get an iterator over the node and all descendants of this node of the specified type.
|
TextNode |
getNextSibling()
Get the right sibling of this node or null if this node has no right sibling.
|
TextNode |
getParent()
Get the parent node of this node or null if this node is the root.
|
ListIterator<TextContainer> |
getPostIterator() |
ListIterator<TextContainer> |
getPostIterator(TextElementType type) |
TextNode |
getPrevSibling()
Get the left sibling of this node or null if this node has no left sibling.
|
int |
hashCode() |
String |
toString() |
getType, getValue
protected final List<TextContainer> children
protected TextContainer parent
protected TextContainer prevSibling
protected TextContainer nextSibling
protected TextContainer()
protected TextContainer(TextElementType type, List<? extends TextContainer> children)
type
- the type of this text elementchildren
- the children of this containerprotected TextContainer(TextElementType type, String value)
type
- the type of this text elementvalue
- the text value of this containerpublic int getChildCount()
TextNode
getChildCount
in interface TextNode
public TextNode getParent()
TextNode
public TextNode getPrevSibling()
TextNode
getPrevSibling
in interface TextNode
public TextNode getNextSibling()
TextNode
getNextSibling
in interface TextNode
public List<TextContainer> getChildren()
TextNode
getChildren
in interface TextNode
public ListIterator<TextContainer> getIterator()
TextNode
getIterator
in interface TextNode
public ListIterator<TextContainer> getIterator(TextElementType type)
TextNode
getIterator
in interface TextNode
type
- the type of nodes to iterate overpublic ListIterator<TextContainer> getPostIterator()
public ListIterator<TextContainer> getPostIterator(TextElementType type)
public int hashCode()
hashCode
in class TextElement
public boolean equals(Object obj)
equals
in class TextElement
public static TokenEncoder getEncoder()
public static TokenDecoder getDecoder()
Copyright © 2016 Actian Corporation. All rights reserved.