- All Known Implementing Classes:
Binding0,Binding1,Binding2,Binding3,Binding4,BindingBase,BindingOverMap,BindingProject,BindingProjectBase,BindingProjectNamed,BindingRoot
public interface Binding
Interface encapsulating a mapping from a name to a value.
A Binding is a map from Var to Node.
It can have a parent, meaning this binding extends (adds new var/node pairs) another.
The operation get(java.lang.String) looks in this binding, then looks in the parent recursively.
Bindings are immutable.
Bindings provide value-based equality and hash code.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic BindingBuilderbuilder()Create aBindingBuilderstatic BindingBuilderCreate aBindingBuilderdefault booleanTest whether a variable is bound to some objectbooleanTest whether a variable is bound to some objectbooleanvoidforEach(BiConsumer<Var, Node> action) Operate on each entry.default NodeReturn the object bound to a variable, or nullReturn the object bound to a variable, or nullinthashCode()booleanisEmpty()Is this an empty binding? No variables.intsize()Number of (var, value) pairs.vars()Iterate over all variables of this binding.
-
Field Details
-
noParent
-
-
Method Details
-
builder
Create aBindingBuilder -
builder
Create aBindingBuilder -
vars
Iterate over all variables of this binding. -
forEach
Operate on each entry. -
contains
Test whether a variable is bound to some object -
get
Return the object bound to a variable, or null -
contains
Test whether a variable is bound to some object -
get
Return the object bound to a variable, or null -
size
int size()Number of (var, value) pairs. -
isEmpty
boolean isEmpty()Is this an empty binding? No variables. -
hashCode
int hashCode() -
equals
-