public abstract class PAATState extends Object
Builder
class for
construction; classes themselves become immutable once made with Builder.build()
method. Will create the
proper object based on the context (for either eval or eval_ for the PAAT algorithm).
IMPORTANT: hashcode
and equals(other)
have been overridden to only treat position
and
last
as the only components of equality in order for the memoization to work correctly for the
PAATStateEvalIterate
class. For this reason, these should both be 0 when position() and last() are not called
(the AST get this info from an invocation of the PrePAATVisitor
) so as to maximize the buffering that occurs.
Modifier and Type | Class and Description |
---|---|
static class |
PAATState.Builder
Standard Builder object for constructing
PAATState objects |
Modifier | Constructor and Description |
---|---|
protected |
PAATState(PAATState.Builder builder)
Creates a new object with the same state as the input parameter; meant to be called only with
Builder.build() method |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Overridden to only treat
position and last as the only components of equality in order for the
memoization to work correctly for the PAATStateEvalIterate class. |
Object |
getActionFreePrefix()
Returns the action free prefix of current context
|
Object |
getActionFreePrefixEnd()
Returns the point in the AST where Action Free Navigation should end
|
int |
getLast()
Returns last position of evaluated "parent" context within filter expression
|
int |
getPosition()
Returns current position of evaluated "parent" context within for filter for position function
|
abstract PAATStateType |
getType()
Returns the type of the object
|
int |
hashCode()
Overridden to only treat
position and last as the only components of equality in order for the
memoization to work correctly for the PAATStateEvalIterate class. |
boolean |
isActionFreeNavigation()
Returns if current navigation is action-free (i.e.
|
boolean |
isDocumentProtected()
Returns if the document containing the context is protected
|
protected PAATState(PAATState.Builder builder)
Builder.build()
methodbuilder
- implicit Builder
object for this PAATState
objectpublic boolean isDocumentProtected()
public Object getActionFreePrefix()
public Object getActionFreePrefixEnd()
public boolean isActionFreeNavigation()
public int getPosition()
public int getLast()
public abstract PAATStateType getType()
public int hashCode()
position
and last
as the only components of equality in order for the
memoization to work correctly for the PAATStateEvalIterate
class.Copyright © 2020 OXPath Team. All rights reserved.