Class QuerySolutionMap

  • All Implemented Interfaces:
    QuerySolution

    public class QuerySolutionMap
    extends QuerySolutionBase
    Implementation of QuerySolution that is backed by an in-memory map.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String name, RDFNode node)  
      void addAll​(QuerySolution other)
      Add all of the solutions from one QuerySolution into this QuerySolutionMap
      void addAll​(QuerySolutionMap other)
      Add all of the solutions from one QuerySolutionMap into this QuerySolutionMap
      java.util.Map<java.lang.String,​RDFNode> asMap()
      Return a Map<String, RDFNode> representing the current state of this QuerySolutionMap.
      void clear()
      Clear this QuerySolutionMap
      java.lang.String toString()  
      java.util.Iterator<java.lang.String> varNames()
      Iterate over the variable names (strings) in this QuerySolution.
      • Methods inherited from class java.lang.Object

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

      • QuerySolutionMap

        public QuerySolutionMap()
    • Method Detail

      • add

        public void add​(java.lang.String name,
                        RDFNode node)
      • varNames

        public java.util.Iterator<java.lang.String> varNames()
        Description copied from interface: QuerySolution
        Iterate over the variable names (strings) in this QuerySolution.
        Specified by:
        varNames in interface QuerySolution
        Specified by:
        varNames in class QuerySolutionBase
        Returns:
        Iterator of strings
      • addAll

        public void addAll​(QuerySolutionMap other)
        Add all of the solutions from one QuerySolutionMap into this QuerySolutionMap
      • asMap

        public java.util.Map<java.lang.String,​RDFNode> asMap()
        Return a Map<String, RDFNode> representing the current state of this QuerySolutionMap. The map is not connected to the QuerySolutionMap and later changes to either Map or QuerySolutionMap will not reflected in the other.
        Returns:
        Map<String, RDFNode>
      • addAll

        public void addAll​(QuerySolution other)
        Add all of the solutions from one QuerySolution into this QuerySolutionMap
      • clear

        public void clear()
        Clear this QuerySolutionMap
      • toString

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