Package com.github.simy4.xpath.view
Class NodeSetView<N extends Node>
- java.lang.Object
-
- com.github.simy4.xpath.view.NodeSetView<N>
-
- All Implemented Interfaces:
IterableNodeView<N>
,View<N>
,java.io.Serializable
,java.lang.Iterable<NodeView<N>>
public abstract class NodeSetView<N extends Node> extends java.lang.Object implements IterableNodeView<N>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeSetView()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(View<N> other)
Compare views by XQuery comparison rules.static <T extends Node>
NodeSetView<T>empty()
IterableNodeView<N>
flatMap(Function<? super NodeView<N>,? extends IterableNodeView<N>> fmap)
static <T extends Node>
NodeSetView<T>of(java.lang.Iterable<? extends T> iterable, Predicate<? super T> filter)
boolean
toBoolean()
Converts this view to a boolean value.double
toNumber()
Converts this view to a numeric value.java.lang.String
toString()
Converts this view to a string value.<T> T
visit(ViewVisitor<N,T> visitor)
Visits current XML element.
-
-
-
Method Detail
-
empty
public static <T extends Node> NodeSetView<T> empty()
-
of
public static <T extends Node> NodeSetView<T> of(java.lang.Iterable<? extends T> iterable, Predicate<? super T> filter)
-
compareTo
public int compareTo(View<N> other)
Description copied from interface:View
Compare views by XQuery comparison rules.
-
toBoolean
public boolean toBoolean()
Description copied from interface:View
Converts this view to a boolean value.
-
toNumber
public double toNumber()
Description copied from interface:View
Converts this view to a numeric value.
-
toString
public java.lang.String toString()
Description copied from interface:View
Converts this view to a string value.
-
visit
public <T> T visit(ViewVisitor<N,T> visitor) throws XmlBuilderException
Description copied from interface:View
Visits current XML element.- Specified by:
visit
in 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:
flatMap
in interfaceIterableNodeView<N extends Node>
-
-