com.bigdata.relation.rule
Class EmptyBindingSet

java.lang.Object
  extended by com.bigdata.relation.rule.EmptyBindingSet
All Implemented Interfaces:
IBindingSet, Serializable, Cloneable

public final class EmptyBindingSet
extends Object
implements IBindingSet, Serializable

An immutable empty binding set.

Version:
$Id: EmptyBindingSet.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
static EmptyBindingSet INSTANCE
          Singleton.
 
Method Summary
 void clear(IVariable var)
          Clear any binding for the variable.
 void clearAll()
          Clear all bindings.
 EmptyBindingSet clone()
          Return a shallow copy of the binding set.
 boolean equals(IBindingSet o)
          True iff the variables and their bound values are the same for the two binding sets.
 IConstant get(IVariable var)
          Return the binding for the variable.
 boolean isBound(IVariable var)
          Return true iff the variable is bound.
 Iterator<Map.Entry<IVariable,IConstant>> iterator()
          Visits the bindings.
 void set(IVariable var, IConstant val)
          Bind the variable to the value.
 int size()
          The #of bound variables.
 Iterator<IVariable> vars()
          Visits the bound variables.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final transient EmptyBindingSet INSTANCE
Singleton.

Method Detail

clone

public EmptyBindingSet clone()
Description copied from interface: IBindingSet
Return a shallow copy of the binding set.

Specified by:
clone in interface IBindingSet
Overrides:
clone in class Object

clear

public void clear(IVariable var)
Description copied from interface: IBindingSet
Clear any binding for the variable.

Specified by:
clear in interface IBindingSet
Parameters:
var - The variable.

clearAll

public void clearAll()
Description copied from interface: IBindingSet
Clear all bindings.

Specified by:
clearAll in interface IBindingSet

iterator

public Iterator<Map.Entry<IVariable,IConstant>> iterator()
Description copied from interface: IBindingSet
Visits the bindings.

Specified by:
iterator in interface IBindingSet

set

public void set(IVariable var,
                IConstant val)
Description copied from interface: IBindingSet
Bind the variable to the value.

Specified by:
set in interface IBindingSet
Parameters:
var - The variable.
val - The value (MAY NOT be null).

size

public int size()
Description copied from interface: IBindingSet
The #of bound variables.

Specified by:
size in interface IBindingSet

equals

public boolean equals(IBindingSet o)
Description copied from interface: IBindingSet
True iff the variables and their bound values are the same for the two binding sets.

Specified by:
equals in interface IBindingSet
Parameters:
o - Another binding set.

get

public IConstant get(IVariable var)
Description copied from interface: IBindingSet
Return the binding for the variable.

Specified by:
get in interface IBindingSet
Parameters:
var - The variable.
Returns:
the binding for the variable -or- null iff the variable is not bound.

isBound

public boolean isBound(IVariable var)
Description copied from interface: IBindingSet
Return true iff the variable is bound.

Specified by:
isBound in interface IBindingSet
Parameters:
var - The variable.
Returns:
true if the variable is bound.

vars

public Iterator<IVariable> vars()
Description copied from interface: IBindingSet
Visits the bound variables.

Specified by:
vars in interface IBindingSet


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.