Interface DmnDecisionResultEntries

  • All Superinterfaces:
    java.util.Map<java.lang.String,​java.lang.Object>, java.io.Serializable
    All Known Implementing Classes:
    DmnDecisionResultEntriesImpl

    public interface DmnDecisionResultEntries
    extends java.util.Map<java.lang.String,​java.lang.Object>, java.io.Serializable

    Represents the output entries (i.e., pairs of output name and value).

    In case of a decision with a decision table, the result contains the output entries of a matched rule. Each output value is mapped to the output name attribute. If no name was given then the entry key is null.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T getEntry​(java.lang.String name)
      Returns the value of the result entry for a given output name.
      java.util.Map<java.lang.String,​java.lang.Object> getEntryMap()
      Returns a map of the result entry values by output name.
      java.util.Map<java.lang.String,​TypedValue> getEntryMapTyped()
      Returns a map of the typed result entry values by output name.
      <T extends TypedValue>
      T
      getEntryTyped​(java.lang.String name)
      Returns the typed value of the result entry for a given output name.
      <T> T getFirstEntry()
      Returns the value of the first result entry.
      <T extends TypedValue>
      T
      getFirstEntryTyped()
      Returns the typed value of the first result entry.
      <T> T getSingleEntry()
      Returns the value of the single entry of the decision result.
      <T extends TypedValue>
      T
      getSingleEntryTyped()
      Returns the typed value of the single entry of the decision result.
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Method Detail

      • getFirstEntry

        <T> T getFirstEntry()
        Returns the value of the first result entry.
        Type Parameters:
        T - the type of the result entry
        Returns:
        the value of the first result entry or null if none exists
        See Also:
        getFirstEntryTyped()
      • getFirstEntryTyped

        <T extends TypedValue> T getFirstEntryTyped()
        Returns the typed value of the first result entry.
        Type Parameters:
        T - the type of the result entry
        Returns:
        the typed value of the first result entry or null if none exists
        See Also:
        getFirstEntry()
      • getSingleEntry

        <T> T getSingleEntry()
        Returns the value of the single entry of the decision result. Asserts that the decision result only has one entry.
        Type Parameters:
        T - the type of the result entry
        Returns:
        the value of the single result entry or null if none exists
        Throws:
        DmnEngineException - if more than one result entry exists
        See Also:
        getSingleEntryTyped()
      • getSingleEntryTyped

        <T extends TypedValue> T getSingleEntryTyped()
        Returns the typed value of the single entry of the decision result. Asserts that the decision result only has one entry.
        Type Parameters:
        T - the type of the result entry
        Returns:
        the typed value of the single result entry or null if none exists
        Throws:
        DmnEngineException - if more than one result entry exists
        See Also:
        getSingleEntry()
      • getEntry

        <T> T getEntry​(java.lang.String name)
        Returns the value of the result entry for a given output name.
        Type Parameters:
        T - the type of the result entry
        Parameters:
        name - the name of the output
        Returns:
        the value for the given name or null if no value exists for this name
        See Also:
        getEntryTyped(String)
      • getEntryTyped

        <T extends TypedValue> T getEntryTyped​(java.lang.String name)
        Returns the typed value of the result entry for a given output name.
        Type Parameters:
        T - the type of the result entry
        Parameters:
        name - the name of the output
        Returns:
        the typed value for the given name or null if no value exists for this name
        See Also:
        getEntry(String)
      • getEntryMap

        java.util.Map<java.lang.String,​java.lang.Object> getEntryMap()
        Returns a map of the result entry values by output name.
        Returns:
        the values of the decision result entries
        See Also:
        getEntryMapTyped()
      • getEntryMapTyped

        java.util.Map<java.lang.String,​TypedValue> getEntryMapTyped()
        Returns a map of the typed result entry values by output name.
        Returns:
        the typed values of the decision result entries
        See Also:
        getEntryMap()