com.clarkparsia.pellet.sparqldl.model
Class ResultBindingImpl

java.lang.Object
  extended by com.clarkparsia.pellet.sparqldl.model.ResultBindingImpl
All Implemented Interfaces:
ResultBinding

public class ResultBindingImpl
extends java.lang.Object
implements ResultBinding

Title: Default implementation of the result binding.

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Petr Kremen

Constructor Summary
ResultBindingImpl()
           
 
Method Summary
 ResultBinding duplicate()
          Clones the binding.
 boolean equals(java.lang.Object obj)
           
 java.util.Set<aterm.ATermAppl> getAllVariables()
          Returns all variables in this binding.
 aterm.ATermAppl getValue(aterm.ATermAppl var)
          Gets value for given variable.
 int hashCode()
           
 boolean isBound(aterm.ATermAppl var)
          Checks whether given variable is bound.
 boolean isEmpty()
          Checks for emptiness of the binding.
 void setValue(aterm.ATermAppl var, aterm.ATermAppl binding)
          Sets one variable binding.
 void setValues(ResultBinding binding)
          Sets all variable bindings according to the bindings.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultBindingImpl

public ResultBindingImpl()
Method Detail

setValue

public void setValue(aterm.ATermAppl var,
                     aterm.ATermAppl binding)
Sets one variable binding.

Specified by:
setValue in interface ResultBinding
Parameters:
var - variable to set.

setValues

public void setValues(ResultBinding binding)
Sets all variable bindings according to the bindings.

Specified by:
setValues in interface ResultBinding
Parameters:
binding - to be set.

getValue

public aterm.ATermAppl getValue(aterm.ATermAppl var)
Gets value for given variable.

Specified by:
getValue in interface ResultBinding
Returns:
binding for the variable

isBound

public boolean isBound(aterm.ATermAppl var)
Checks whether given variable is bound.

Specified by:
isBound in interface ResultBinding
Parameters:
var - variable to determine.
Returns:
true if the given variable is bound.

getAllVariables

public java.util.Set<aterm.ATermAppl> getAllVariables()
Returns all variables in this binding.

Specified by:
getAllVariables in interface ResultBinding
Returns:
set of all variables.

duplicate

public ResultBinding duplicate()
Clones the binding.

Specified by:
duplicate in interface ResultBinding
Returns:
new copy of the binding.

toString

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

isEmpty

public boolean isEmpty()
Checks for emptiness of the binding.

Specified by:
isEmpty in interface ResultBinding
Returns:
true if the binding doesn't contain a variable.

hashCode

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

equals

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


Copyright © 2004 Evren Sirin. All Rights Reserved.