Class Write

  • All Implemented Interfaces:
    KnowledgeBaseConsumer, PredicateFactory

    public final class Write
    extends AbstractSingleResultPredicate
    write(X) - writes a term to the output stream.

    Writes the term X to the current output stream. write takes account of current operator declarations - thus an infix operator will be printed out between its arguments. write represents lists as a comma separated sequence of elements enclosed in square brackets.

    Succeeds only once.

    writeln(X) writes the term X to the current output stream, followed by a new line character. writeln(X) can be used as an alternative to write(X), nl.

    See Also:
    toString(Term)
    • Field Detail

      • addNewLine

        private final boolean addNewLine
    • Constructor Detail

      • Write

        private Write​(boolean addNewLine)
    • Method Detail

      • write

        public static Write write()
      • writeln

        public static Write writeln()
      • writeString

        private void writeString​(java.lang.String s)
      • toString

        private java.lang.String toString​(Term t)