UnificationList Interface

com.bea.p13n.expression
UnificationList Interface

public interface UnificationList

An interface for a class that maps variable names to the variable values.

Field Summary

public static final Byte
NO_BOUND_VALUE
A constant that is used as a marker to indicate that there is no value bound for a particular name string.
 

Method Summary

public void
addObject(String name, Object object)
Adds a new object to the unbound list.
public void
append(UnificationList unificationList)
Appends another UnificationList onto the end of this.
public void
bind(String name, Object value)
Binds a value to a given name.
public boolean
contains(Object value)
Tests whether this contains the given value.
public boolean
containsBound(String value)
Tests whether this contains the given value and the value has been bound to a variable name.
public Object
getBound(String name, Class classType)
Returns the Object that has been bound to a name.
public Object
getValue(String name, Class classType)
Returns the value of a bound variable or get an unbound value and then bind it.

Field Detail

NO_BOUND_VALUE

public static final Byte NO_BOUND_VALUE
A constant that is used as a marker to indicate that there is no value bound for a particular name string.

 

Method Detail

addObject(String, Object) Method

public void addObject(String name, 
                      Object object)
Adds a new object to the unbound list.

Parameters

name
the variable name for the value.
object
the value to be associated with the name.

append(UnificationList) Method

public void append(UnificationList unificationList)
Appends another UnificationList onto the end of this.

Parameters

unificationList
the UnificationList to be appended

bind(String, Object) Method

public void bind(String name, 
                 Object value)
Binds a value to a given name.

Parameters

name
the variable name for the value.
value
the value to be associated with the name.

contains(Object) Method

public boolean contains(Object value)
Tests whether this contains the given value. The contains test is done by matching the references.

Parameters

value
the Object to be tested for.

Returns

true if this UnificationList contains the given Object.

containsBound(String) Method

public boolean containsBound(String value)
Tests whether this contains the given value and the value has been bound to a variable name. The contains test is done by matching the references.

Parameters

value
the Object to be tested for.

Returns

true if this UnificationList contains the given Object.

getBound(String, Class) Method

public Object getBound(String name, 
                       Class classType)
Returns the Object that has been bound to a name.

Parameters

name
the variable name for the value.
classType
the class type of the value requested.

Returns

a bound value or null if none was found.

getValue(String, Class) Method

public Object getValue(String name, 
                       Class classType)
Returns the value of a bound variable or get an unbound value and then bind it.

Parameters

name
the variable name for the value.
classType
the class type of the value requested.

Returns

a bound or unbound value or null if none was found.