public final class EmptyBindingSet extends Object implements IBindingSet, Serializable
Modifier and Type | Field and Description |
---|---|
static EmptyBindingSet |
INSTANCE
Immutable singleton.
|
Modifier and Type | Method and Description |
---|---|
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 |
containsErrorValues() |
EmptyBindingSet |
copy(IVariable[] variablesToDrop)
Return a shallow copy of the binding set, eliminating unnecessary
variables.
|
EmptyBindingSet |
copyMinusErrors(IVariable[] variablesToDrop)
Returns the same object.
|
boolean |
equals(Object t)
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.
|
int |
hashCode()
The hash code of an empty binding set is always zero.
|
boolean |
isBound(IVariable var)
Return
true iff the variable is bound. |
boolean |
isEmpty()
true iff there are no variable bindings in the binding set. |
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.
|
public static final transient EmptyBindingSet INSTANCE
public EmptyBindingSet clone()
IBindingSet
clone
in interface IBindingSet
clone
in class Object
public EmptyBindingSet copy(IVariable[] variablesToDrop)
IBindingSet
copy
in interface IBindingSet
variablesToDrop
- When non-null
, only the listed variables are
retained.public EmptyBindingSet copyMinusErrors(IVariable[] variablesToDrop)
copyMinusErrors
in interface IBindingSet
variablesToDrop
- When non-null
, only the listed variables are
retained.public final boolean containsErrorValues()
containsErrorValues
in interface IBindingSet
public void clear(IVariable var)
IBindingSet
clear
in interface IBindingSet
var
- The variable.public void clearAll()
IBindingSet
clearAll
in interface IBindingSet
public Iterator<Map.Entry<IVariable,IConstant>> iterator()
IBindingSet
iterator
in interface IBindingSet
public void set(IVariable var, IConstant val)
IBindingSet
set
in interface IBindingSet
var
- The variable.val
- The value (MAY NOT be null
).public boolean isEmpty()
IBindingSet
true
iff there are no variable bindings in the binding set.isEmpty
in interface IBindingSet
public int size()
IBindingSet
size
in interface IBindingSet
public boolean equals(Object t)
IBindingSet
equals
in interface IBindingSet
equals
in class Object
t
- Another binding set.public int hashCode()
hashCode
in interface IBindingSet
hashCode
in class Object
public IConstant get(IVariable var)
IBindingSet
get
in interface IBindingSet
var
- The variable.null
iff the
variable is not bound.public boolean isBound(IVariable var)
IBindingSet
true
iff the variable is bound.isBound
in interface IBindingSet
var
- The variable.true
if the variable is bound.public Iterator<IVariable> vars()
IBindingSet
vars
in interface IBindingSet
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.