IterableNodeView<N>
, View<N>
, java.lang.Comparable<N>
, java.lang.Iterable<N>
public final class NodeSetView<N extends Node> extends java.lang.Object implements IterableNodeView<N>
Constructor | Description |
---|---|
NodeSetView(java.lang.Iterable<NodeView<N>> nodeSet) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(View<N> other) |
|
static <T extends Node> |
empty() |
|
boolean |
equals(java.lang.Object o) |
|
IterableNodeView<N> |
filter(Navigator<N> navigator,
boolean greedy,
int position,
Predicate<ViewContext<?>> predicate) |
|
IterableNodeView<N> |
filter(Navigator<N> navigator,
boolean greedy,
Predicate<ViewContext<?>> predicate) |
|
static <T extends Node> |
filtered(java.lang.Iterable<? extends T> nodes,
Predicate<? super T> predicate) |
Creates filtered node view from given nodes and predicate.
|
IterableNodeView<N> |
flatMap(Navigator<N> navigator,
boolean greedy,
Function<ViewContext<N>,IterableNodeView<N>> fmap) |
|
int |
hashCode() |
|
java.util.Iterator<NodeView<N>> |
iterator() |
|
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.
|
public static <T extends Node> NodeSetView<T> empty()
public static <T extends Node> NodeSetView<T> filtered(java.lang.Iterable<? extends T> nodes, Predicate<? super T> predicate)
T
- XML model typenodes
- nodes to wap in a viewpredicate
- predicate to apply to nodespublic boolean toBoolean()
View
public double toNumber()
View
public java.lang.String toString()
View
public <T> T visit(ViewVisitor<N,T> visitor) throws XmlBuilderException
View
visit
in interface View<N extends Node>
T
- type of return valuevisitor
- XML element visitorXmlBuilderException
- if error occur during XML model modificationpublic IterableNodeView<N> filter(Navigator<N> navigator, boolean greedy, Predicate<ViewContext<?>> predicate) throws XmlBuilderException
filter
in interface IterableNodeView<N extends Node>
XmlBuilderException
public IterableNodeView<N> filter(Navigator<N> navigator, boolean greedy, int position, Predicate<ViewContext<?>> predicate) throws XmlBuilderException
filter
in interface IterableNodeView<N extends Node>
XmlBuilderException
public IterableNodeView<N> flatMap(Navigator<N> navigator, boolean greedy, Function<ViewContext<N>,IterableNodeView<N>> fmap) throws XmlBuilderException
flatMap
in interface IterableNodeView<N extends Node>
XmlBuilderException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object