com.hp.hpl.jena.graph.query
Class Bind
java.lang.Object
com.hp.hpl.jena.graph.query.Element
com.hp.hpl.jena.graph.query.Bind
public class Bind
- extends Element
A binding instance of a variable. It accepts any node and records it in the supplied
Domain at the index allocated to it when it is created.
- Author:
- hedgehog
Fields inherited from class com.hp.hpl.jena.graph.query.Element |
ANY |
Constructor Summary |
Bind(int n)
Initialise a Bind element: remember the index n which is the
place in Domain's where it may store its value. |
Bind
public Bind(int n)
- Initialise a Bind element: remember the index
n
which is the
place in Domain's where it may store its value.
match
public boolean match(Domain d,
Node x)
- Answer true after updating the domain to record the value this element binds.
- Specified by:
match
in class Element
- Parameters:
d
- the domain in which to note this element is bound to x
.x
- the value to match
- Returns:
- true [after side-effecting d]
asNodeMatch
public Node asNodeMatch(Domain d)
- Answer Node.ANY, as a binding occurance of a variable can match anything.
- Specified by:
asNodeMatch
in class Element
- Parameters:
d
- the domain holding the variable bindings
- Returns:
- the matched value (null if none, ie binding occurance or ANY)
toString
public String toString()
- Overrides:
toString
in class Element
Licenced under the Apache License, Version 2.0