Class BindingBase

All Implemented Interfaces:
Direct Known Subclasses:
Binding0, Binding1, Binding2, Binding3, Binding4, BindingOverMap, BindingProjectBase

public abstract class BindingBase extends Object implements Binding
Machinery encapsulating a mapping from a name to a value. The "parent" is a shared, immutable, common set of bindings. An association of var/node must not override a setting in the parent.
  • Method Details

    • vars

      public final Iterator<Var> vars()
      Description copied from interface: Binding
      Iterate over all variables of this binding.
      Specified by:
      vars in interface Binding
    • forEach

      public void forEach(BiConsumer<Var,Node> action)
      Operate on each entry.
      Specified by:
      forEach in interface Binding
    • size

      public final int size()
      Description copied from interface: Binding
      Number of (var, value) pairs.
      Specified by:
      size in interface Binding
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Binding
      Is this an empty binding? No variables.
      Specified by:
      isEmpty in interface Binding
    • contains

      public final boolean contains(Var var)
      Test whether a name is bound to some object
      Specified by:
      contains in interface Binding
    • get

      public final Node get(Var var)
      Return the object bound to a name, or null
      Specified by:
      get in interface Binding
    • toString

      public String toString()
      toString in class Object
    • format1

      public void format1(StringBuffer sbuff)
    • toString1

      public String toString1()
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Binding
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in interface Binding
      equals in class Object
    • hashCode

      public static int hashCode(Binding bind)