com.hp.hpl.jena.graph.query
Class Fixed

java.lang.Object
  extended by com.hp.hpl.jena.graph.query.Element
      extended by com.hp.hpl.jena.graph.query.Fixed

public class Fixed
extends Element

An Element that matches a single specified value.

Author:
hedgehog

Field Summary
 
Fields inherited from class com.hp.hpl.jena.graph.query.Element
ANY
 
Constructor Summary
Fixed(Node x)
          Initialise this element with its single matching value: remember that value.
 
Method Summary
 Node asNodeMatch(Domain d)
          Answer the Node we represent given the variable-bindings Domain.
 boolean match(Domain d, Node x)
          Answer true iff we are matched against a node with the same value as ours.
 String toString()
           
 
Methods inherited from class com.hp.hpl.jena.graph.query.Element
getIndex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Fixed

public Fixed(Node x)
Initialise this element with its single matching value: remember that value.

Method Detail

match

public boolean match(Domain d,
                     Node x)
Answer true iff we are matched against a node with the same value as ours.

Specified by:
match in class Element
Parameters:
d - the domain with bound values (ignored)
x - the node we are to match
Returns:
true iff our value is the same as his

asNodeMatch

public Node asNodeMatch(Domain d)
Answer the Node we represent given the variable-bindings Domain.

Specified by:
asNodeMatch in class Element
Parameters:
d - the variable bindings to use (ignored)
Returns:
our fixed value

toString

public String toString()
Overrides:
toString in class Element


Licenced under the Apache License, Version 2.0