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, BindingHashMap, BindingProjectBase

public abstract class BindingBase
extends Object
implements Binding

Machinary encapsulating a mapping from a name to a value. The "parent" is a shared, immutable, common set of bindings. An association of var/node must not override a setting in the parent.

See Also:
BindingFactory, for mutable bindings.

Method Summary
 boolean contains(Var var)
          Test whether a name is bound to some object
static boolean equals(Binding bind1, Binding bind2)
           
 boolean equals(Object other)
           
 void format1(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.
 String toString()
           
 String toString1()
           
 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()

vars

public final 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 String toString()
Overrides:
toString in class Object

format1

public void format1(StringBuffer sbuff)

toString1

public String toString1()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public static int hashCode(Binding bind)

equals

public static boolean equals(Binding bind1,
                             Binding bind2)


Licenced under the Apache License, Version 2.0