com.hp.hpl.jena.sparql.engine.binding
Class BindingBase

java.lang.Object
  extended by com.hp.hpl.jena.sparql.engine.binding.BindingBase
All Implemented Interfaces:
Binding
Direct Known Subclasses:
Binding0, Binding1, BindingMap, BindingProject

public abstract class BindingBase
extends java.lang.Object
implements Binding

Machinary encapsulating a mapping from a name to a value.


Method Summary
 void add(Var var, com.hp.hpl.jena.graph.Node node)
          Add a (var,value) - the node value is never null
 void addAll(Binding other)
           
 boolean contains(Var var)
          Test whether a name is bound to some object
static boolean equals(Binding bind1, Binding bind2)
           
 boolean equals(java.lang.Object other)
           
 void format1(java.lang.StringBuffer sbuff)
           
 com.hp.hpl.jena.graph.Node get(Var var)
          Return the object bound to a name, or null
 Binding getParent()
           
 int hashCode()
           
static int hashCode(Binding bind)
           
 boolean isEmpty()
          Is this an empty binding? No variables.
 int size()
          Number of (var, value) pairs.
 java.lang.String toString()
           
 java.lang.String toString1()
           
 java.util.Iterator<Var> vars()
          Iterate over all the names of variables.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getParent

public Binding getParent()
Specified by:
getParent in interface Binding

add

public final void add(Var var,
                      com.hp.hpl.jena.graph.Node node)
Add a (var,value) - the node value is never null

Specified by:
add in interface Binding

addAll

public void addAll(Binding other)
Specified by:
addAll in interface Binding

vars

public final java.util.Iterator<Var> vars()
Iterate over all the names of variables.

Specified by:
vars in interface Binding

size

public final int size()
Description copied from interface: Binding
Number of (var, value) pairs.

Specified by:
size in interface Binding

isEmpty

public boolean isEmpty()
Description copied from interface: Binding
Is this an empty binding? No variables.

Specified by:
isEmpty in interface Binding

contains

public boolean contains(Var var)
Test whether a name is bound to some object

Specified by:
contains in interface Binding

get

public final com.hp.hpl.jena.graph.Node get(Var var)
Return the object bound to a name, or null

Specified by:
get in interface Binding

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

format1

public void format1(java.lang.StringBuffer sbuff)

toString1

public java.lang.String toString1()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public static int hashCode(Binding bind)

equals

public static boolean equals(Binding bind1,
                             Binding bind2)


Copyright ? 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP Copyright ? 2010 Talis Systems Ltd. Copyright ? 2010, 2011 Epimorphics Ltd.