Class VariableBinding


  • public class VariableBinding
    extends java.lang.Object

    Title: Variable Binding

    Description: Keeps variable bindings. Data and Individual variables are kept in seperate name spaces.

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Ron Alford
    • Constructor Detail

      • VariableBinding

        public VariableBinding​(ABox abox)
      • VariableBinding

        public VariableBinding​(VariableBinding binding)
        Shallow copies the binding maps.
        Parameters:
        binding -
    • Method Detail

      • containsKey

        public boolean containsKey​(AtomDVariable key)
      • containsKey

        public boolean containsKey​(AtomIVariable key)
      • entrySet

        public java.util.Set<java.util.Map.Entry<? extends AtomVariable,​? extends Node>> entrySet()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • get

        public Literal get​(AtomDObject key)
        If the key is a variable, return the _node associated with it in the map. If the key is a constant, return the corresponding _node from the _abox.
        Parameters:
        key -
        Returns:
        a node
      • get

        public Individual get​(AtomIObject key)
        If the key is a variable, return the _individual associated with it in the map. If the key is a constant, return the corresponding _individual from the _abox.
        Parameters:
        key -
        Returns:
        an individual link to the key of the abox
      • getABox

        public ABox getABox()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • set

        public Literal set​(AtomDObject key,
                           Literal value)
        If the key is a _data variable, set the value. Otherwise, ignore it.
        Parameters:
        key -
        value -
        Returns:
        the visited value after acceptation
      • set

        public Individual set​(AtomIObject key,
                              Individual value)
        If the key is an instance variable, set the value. Otherwise, ignore it.
        Parameters:
        key -
        value -
        Returns:
        the visited individual after acceptation
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object