Class VariableUtils


  • public class VariableUtils
    extends java.lang.Object

    Title: Variable Utilities

    Description: Collection of utilities for dealing with variables

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Ron Alford
    • Constructor Summary

      Constructors 
      Constructor Description
      VariableUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<AtomDVariable> getDVars​(RuleAtom atom)
      Static convenience function to return the instance variables used in the given atom.
      static java.util.Collection<AtomIVariable> getIVars​(RuleAtom atom)
      Static convenience function to return the instance variables used in the given atom.
      static java.util.Collection<AtomVariable> getVars​(RuleAtom atom)
      Static convenience function to return the variables used in the given atom.
      static boolean isVariable​(AtomObject obj)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VariableUtils

        public VariableUtils()
    • Method Detail

      • getDVars

        public static java.util.Collection<AtomDVariable> getDVars​(RuleAtom atom)
        Static convenience function to return the instance variables used in the given atom.
        Parameters:
        atom -
        Returns:
        return the instance variables used in the given atom.
      • getIVars

        public static java.util.Collection<AtomIVariable> getIVars​(RuleAtom atom)
        Static convenience function to return the instance variables used in the given atom.
        Parameters:
        atom -
        Returns:
        return the instance variables used in the given atom.
      • getVars

        public static java.util.Collection<AtomVariable> getVars​(RuleAtom atom)
        Static convenience function to return the variables used in the given atom.
        Parameters:
        atom -
        Returns:
        the variables used in the given atom.
      • isVariable

        public static boolean isVariable​(AtomObject obj)
        Parameters:
        obj -
        Returns:
        true if atom object is a variable