com.github.simy4.xpath.view.ViewContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xpath-to-xml-core Show documentation
Show all versions of xpath-to-xml-core Show documentation
Convenient utility to build XML models by evaluating XPath expressions
package com.github.simy4.xpath.view;
import com.github.simy4.xpath.navigator.Navigator;
import com.github.simy4.xpath.navigator.Node;
public final class ViewContext {
private final Navigator navigator;
private final NodeView current;
private final boolean greedy;
private final boolean hasNext;
private final int position;
public ViewContext(Navigator navigator, NodeView current, boolean greedy) {
this(navigator, current, greedy, false, 1);
}
/**
* Constructor.
*
* @param navigator XML navigator
* @param current XML context node view
* @param greedy is context greedy
* @param hasNext is there a node after this
* @param position XML context node position
*/
public ViewContext(Navigator navigator, NodeView current, boolean greedy, boolean hasNext, int position) {
this.navigator = navigator;
this.current = current;
this.greedy = greedy;
this.hasNext = hasNext;
this.position = position;
}
public Navigator getNavigator() {
return navigator;
}
public NodeView getCurrent() {
return current;
}
public boolean isGreedy() {
return greedy;
}
public boolean hasNext() {
return hasNext;
}
public int getPosition() {
return position;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy