Package moise.prolog

Class PrologPredicate

  • All Implemented Interfaces:
    ToProlog

    public class PrologPredicate
    extends java.lang.Object
    implements ToProlog
    A general PrologPredicate: (id,attributes([]), )
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.List<java.lang.String> attributes  
      (package private) java.lang.String functor  
      (package private) java.util.List<java.lang.String> terms  
    • Constructor Summary

      Constructors 
      Constructor Description
      PrologPredicate​(java.lang.String f)  
    • Method Summary

      Modifier and Type Method Description
      void addAttribute​(java.lang.String id, boolean value)
      adds a boolean attribute
      void addAttribute​(java.lang.String id, java.lang.String value)
      adds a string attribute
      void addTerm​(java.lang.String t)  
      java.lang.String getAsProlog()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • functor

        java.lang.String functor
      • attributes

        java.util.List<java.lang.String> attributes
      • terms

        java.util.List<java.lang.String> terms
    • Constructor Detail

      • PrologPredicate

        public PrologPredicate​(java.lang.String f)
    • Method Detail

      • addAttribute

        public void addAttribute​(java.lang.String id,
                                 boolean value)
        adds a boolean attribute
      • addAttribute

        public void addAttribute​(java.lang.String id,
                                 java.lang.String value)
        adds a string attribute
      • addTerm

        public void addTerm​(java.lang.String t)
      • getAsProlog

        public java.lang.String getAsProlog()
        Specified by:
        getAsProlog in interface ToProlog
      • toString

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