|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.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 doublevalue)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
float floatvalue)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
int intvalue)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
long longvalue)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
PBTerm termvalue)
Adds the specified variable binding. |
Bindings |
bind(java.lang.String name,
java.lang.String stringvalue)
Adds the specified variable binding. |
Bindings |
bindAtom(java.lang.String name,
java.lang.String atomvalue)
Adds the specified variable binding. |
PBTerm |
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 intvalue)
name
- a prolog variable nameintvalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, long longvalue)
name
- a prolog variable namelongvalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, float floatvalue)
name
- a prolog variable namefloatvalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, double doublevalue)
name
- a prolog variable namedoublevalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, java.lang.String stringvalue)
name
- a prolog variable namestringvalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bind(java.lang.String name, PBTerm termvalue)
name
- a prolog variable nametermvalue
- the value to bind to the variable
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic Bindings bindAtom(java.lang.String name, java.lang.String atomvalue)
name
- a prolog variable nameatomvalue
- the value to bind to the variable as an atom
Bindings
object
{@if.java
- java.lang. }IllegalArgumentException if the name is not a
valid prolog variable namepublic PBTerm getValue(java.lang.String name)
null
if the variable is not bound.
name
- the name of the variable
PBTerm
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 |