Package com.github.simy4.xpath.view
Class NodeView<N extends Node>
- java.lang.Object
-
- com.github.simy4.xpath.view.NodeView<N>
-
- All Implemented Interfaces:
IterableNodeView<N>,View<N>,java.io.Serializable,java.lang.Iterable<NodeView<N>>
public final class NodeView<N extends Node> extends java.lang.Object implements IterableNodeView<N>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(View<N> other)Compare views by XQuery comparison rules.IterableNodeView<N>flatMap(Function<? super NodeView<N>,? extends IterableNodeView<N>> fmap)NgetNode()intgetPosition()booleanhasNext()booleanisMarked()booleanisNew()java.util.Iterator<NodeView<N>>iterator()voidmark()booleantoBoolean()Converts this view to a boolean value.doubletoNumber()Converts this view to a numeric value.java.lang.StringtoString()Converts this view to a string value.<T> Tvisit(ViewVisitor<N,T> visitor)Visits current XML element.
-
-
-
Method Detail
-
compareTo
public int compareTo(View<N> other)
Description copied from interface:ViewCompare views by XQuery comparison rules.
-
toBoolean
public boolean toBoolean()
Description copied from interface:ViewConverts this view to a boolean value.
-
toNumber
public double toNumber()
Description copied from interface:ViewConverts this view to a numeric value.
-
toString
public java.lang.String toString()
Description copied from interface:ViewConverts this view to a string value.
-
visit
public <T> T visit(ViewVisitor<N,T> visitor) throws XmlBuilderException
Description copied from interface:ViewVisits current XML element.- Specified by:
visitin interfaceView<N extends Node>- Type Parameters:
T- type of return value- Parameters:
visitor- XML element visitor- Returns:
- visitor result
- Throws:
XmlBuilderException- if error occur during XML model modification
-
flatMap
public IterableNodeView<N> flatMap(Function<? super NodeView<N>,? extends IterableNodeView<N>> fmap)
- Specified by:
flatMapin interfaceIterableNodeView<N extends Node>
-
getNode
public N getNode()
-
getPosition
public int getPosition()
-
hasNext
public boolean hasNext()
-
isNew
public boolean isNew()
-
isMarked
public boolean isMarked()
-
mark
public void mark()
-
-