|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.sics.prologbeans.Bindings
public class Bindings
Bindings
handles the variable bindings in the
communication with the prolog server. Using variable bindings
ensures that the values are properly quoted when sent to the
prolog server.
Constructor Summary | |
---|---|
Bindings()
Creates a new Bindings instance with no variable bindings. |
|
Bindings(Bindings binds)
Creates a new Bindings instance and copies all existing
variable bindings from the specified bindings. |
Method Summary | |
---|---|
Bindings |
bind(java.lang.String name,
double value)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
float value)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
int value)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
long value)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
java.lang.String value)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
Term value)
Adds the specified variable binding. |
Bindings |
bindAtom(java.lang.String name,
java.lang.String value)
Adds the specified variable binding. |
Term |
getValue(java.lang.String name)
Returns the value for the specified variable or null
if the variable is not bound. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Bindings()
Bindings
instance with no variable bindings.
public Bindings(Bindings binds)
Bindings
instance and copies all existing
variable bindings from the specified bindings.
binds
- the variable bindings to copyMethod Detail |
---|
public Bindings bind(java.lang.String name, int value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, long value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, float value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, double value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, java.lang.String value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, Term value)
name
- a prolog variable namevalue
- the value to bind to the variable
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Bindings bindAtom(java.lang.String name, java.lang.String value)
name
- a prolog variable namevalue
- the value to bind to the variable as an atom
Bindings
object
java.lang.IllegalArgumentException
- if the name is not a
valid prolog variable namepublic Term getValue(java.lang.String name)
null
if the variable is not bound.
name
- the name of the variable
Term
or
null
if the variable is not boundpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |