org.openrdf.query.impl
Class BindingImpl

java.lang.Object
  extended by org.openrdf.query.impl.BindingImpl
All Implemented Interfaces:
Binding

public class BindingImpl
extends Object
implements Binding

An implementation of the Binding interface.


Constructor Summary
BindingImpl(String name, Value value)
          Creates a binding object with the supplied name and value.
 
Method Summary
 boolean equals(Object o)
          Compares a binding object to another object.
 String getName()
          Gets the name of the binding (e.g.
 Value getValue()
          Gets the value of the binding.
 int hashCode()
          The hash code of a binding is defined as the bit-wise XOR of the hash codes of its name and value:
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BindingImpl

public BindingImpl(String name,
                   Value value)
Creates a binding object with the supplied name and value.

Parameters:
name - The binding's name.
value - The binding's value.
Method Detail

getName

public String getName()
Description copied from interface: Binding
Gets the name of the binding (e.g. the variable name).

Specified by:
getName in interface Binding
Returns:
The name of the binding.

getValue

public Value getValue()
Description copied from interface: Binding
Gets the value of the binding. The returned value is never equal to null, such a "binding" is considered to be unbound.

Specified by:
getValue in interface Binding
Returns:
The value of the binding, never null.

equals

public boolean equals(Object o)
Description copied from interface: Binding
Compares a binding object to another object.

Specified by:
equals in interface Binding
Overrides:
equals in class Object
Parameters:
o - The object to compare this binding to.
Returns:
true if the other object is an instance of Binding and both their names and values are equal, false otherwise.

hashCode

public int hashCode()
Description copied from interface: Binding
The hash code of a binding is defined as the bit-wise XOR of the hash codes of its name and value:
 name.hashCode() ˆ value.hashCode()
 
.

Specified by:
hashCode in interface Binding
Overrides:
hashCode in class Object
Returns:
A hash code for the binding.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2007 Aduna. All Rights Reserved.