Class WorkspaceImpl

    • Constructor Detail

      • WorkspaceImpl

        public WorkspaceImpl()
    • Method Detail

      • addRule

        public void addRule​(Statement statement)
        Description copied from interface: Workspace
        Add a new rule to this workspace.
        Specified by:
        addRule in interface Workspace
        Parameters:
        statement - The rule to add to this workspace.
      • getRules

        public List<Statement> getRules()
        Specified by:
        getRules in interface Workspace
        Returns:
        A list of all the rules defined in this workspace.
      • contains

        public boolean contains​(String alias)
        Description copied from interface: Environment
        Checks if this environment provides a VTL object with the specified name.
        Specified by:
        contains in interface Environment
        Parameters:
        alias - The name of requested object.
        Returns:
        true if this environment provides the specified object.
      • getValue

        public Optional<VTLValue> getValue​(String alias)
        Description copied from interface: Environment
        Returns an Optional reference to a VTL object with the specified name in this environment.
        Specified by:
        getValue in interface Environment
        Parameters:
        alias - The name of requested object.
        Returns:
        An Optional with a reference to the requested object o Optional.empty() if the object is not found in this environment.
      • getRule

        public Optional<Statement> getRule​(String alias)
        Description copied from interface: Workspace
        Returns an Optional reference to a Statement with the specified name in this environment.
        Specified by:
        getRule in interface Workspace
        Parameters:
        alias - The name of requested rule.
        Returns:
        An Optional with a reference to the requested object or Optional.empty() if the object is not found in this environment.