Package org.camunda.bpm.dmn.engine.impl
Class DmnDecisionTableResultImpl
- java.lang.Object
-
- org.camunda.bpm.dmn.engine.impl.DmnDecisionTableResultImpl
-
- All Implemented Interfaces:
Serializable
,Iterable<DmnDecisionRuleResult>
,Collection<DmnDecisionRuleResult>
,List<DmnDecisionRuleResult>
,DmnDecisionTableResult
public class DmnDecisionTableResultImpl extends Object implements DmnDecisionTableResult
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DmnEngineLogger
LOG
protected List<DmnDecisionRuleResult>
ruleResults
-
Constructor Summary
Constructors Constructor Description DmnDecisionTableResultImpl(List<DmnDecisionRuleResult> ruleResults)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
LOG
public static final DmnEngineLogger LOG
-
ruleResults
protected final List<DmnDecisionRuleResult> ruleResults
-
-
Constructor Detail
-
DmnDecisionTableResultImpl
public DmnDecisionTableResultImpl(List<DmnDecisionRuleResult> ruleResults)
-
-
Method Detail
-
getFirstResult
public DmnDecisionRuleResult getFirstResult()
Description copied from interface:DmnDecisionTableResult
Returns the firstDmnDecisionRuleResult
.- Specified by:
getFirstResult
in interfaceDmnDecisionTableResult
- Returns:
- the first decision rule result or null if none exits
-
getSingleResult
public DmnDecisionRuleResult getSingleResult()
Description copied from interface:DmnDecisionTableResult
Returns the singleDmnDecisionRuleResult
of the result. Which asserts that only one decision rule result exist.- Specified by:
getSingleResult
in interfaceDmnDecisionTableResult
- Returns:
- the single decision rule result or null if none exists
-
collectEntries
public <T> List<T> collectEntries(String outputName)
Description copied from interface:DmnDecisionTableResult
Collects the entries for a output name. The list will contain entries for the output name of everyDmnDecisionRuleResult
. Note that the list may contains less entries than decision rule results if an output does not contain a value for the output name.- Specified by:
collectEntries
in interfaceDmnDecisionTableResult
- Type Parameters:
T
- the type of the rule result entry- Parameters:
outputName
- the name of the output to collect- Returns:
- the list of collected output values
-
getResultList
public List<Map<String,Object>> getResultList()
Description copied from interface:DmnDecisionTableResult
Returns the entries of all decision rule results. For every decision rule result a map of the output names and corresponding entries is returned.- Specified by:
getResultList
in interfaceDmnDecisionTableResult
- Returns:
- the list of all entry maps
- See Also:
DmnDecisionRuleResult.getEntryMap()
-
getSingleEntry
public <T> T getSingleEntry()
Description copied from interface:DmnDecisionTableResult
Returns the value of the single entry of the decision rule result. Asserts that only one decision rule result with a single entry exist.- Specified by:
getSingleEntry
in interfaceDmnDecisionTableResult
- Type Parameters:
T
- the type of the result entry- Returns:
- the value of the single result entry or null if none exists
- See Also:
DmnDecisionTableResult.getSingleEntryTyped()
-
getSingleEntryTyped
public <T extends TypedValue> T getSingleEntryTyped()
Description copied from interface:DmnDecisionTableResult
Returns the typed value of the single entry of the decision rule result. Asserts that only one decision rule result with a single entry exist.- Specified by:
getSingleEntryTyped
in interfaceDmnDecisionTableResult
- Type Parameters:
T
- the type of the result entry- Returns:
- the typed value of the single result entry or null if none exists
- See Also:
DmnDecisionTableResult.getSingleEntry()
-
iterator
public Iterator<DmnDecisionRuleResult> iterator()
- Specified by:
iterator
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
iterator
in interfaceIterable<DmnDecisionRuleResult>
- Specified by:
iterator
in interfaceList<DmnDecisionRuleResult>
-
size
public int size()
- Specified by:
size
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
size
in interfaceList<DmnDecisionRuleResult>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
isEmpty
in interfaceList<DmnDecisionRuleResult>
-
get
public DmnDecisionRuleResult get(int index)
- Specified by:
get
in interfaceList<DmnDecisionRuleResult>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
contains
in interfaceList<DmnDecisionRuleResult>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
toArray
in interfaceList<DmnDecisionRuleResult>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
toArray
in interfaceList<DmnDecisionRuleResult>
-
add
public boolean add(DmnDecisionRuleResult e)
- Specified by:
add
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
add
in interfaceList<DmnDecisionRuleResult>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
remove
in interfaceList<DmnDecisionRuleResult>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
containsAll
in interfaceList<DmnDecisionRuleResult>
-
addAll
public boolean addAll(Collection<? extends DmnDecisionRuleResult> c)
- Specified by:
addAll
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
addAll
in interfaceList<DmnDecisionRuleResult>
-
addAll
public boolean addAll(int index, Collection<? extends DmnDecisionRuleResult> c)
- Specified by:
addAll
in interfaceList<DmnDecisionRuleResult>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
removeAll
in interfaceList<DmnDecisionRuleResult>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
retainAll
in interfaceList<DmnDecisionRuleResult>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<DmnDecisionRuleResult>
- Specified by:
clear
in interfaceList<DmnDecisionRuleResult>
-
set
public DmnDecisionRuleResult set(int index, DmnDecisionRuleResult element)
- Specified by:
set
in interfaceList<DmnDecisionRuleResult>
-
add
public void add(int index, DmnDecisionRuleResult element)
- Specified by:
add
in interfaceList<DmnDecisionRuleResult>
-
remove
public DmnDecisionRuleResult remove(int index)
- Specified by:
remove
in interfaceList<DmnDecisionRuleResult>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interfaceList<DmnDecisionRuleResult>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<DmnDecisionRuleResult>
-
listIterator
public ListIterator<DmnDecisionRuleResult> listIterator()
- Specified by:
listIterator
in interfaceList<DmnDecisionRuleResult>
-
listIterator
public ListIterator<DmnDecisionRuleResult> listIterator(int index)
- Specified by:
listIterator
in interfaceList<DmnDecisionRuleResult>
-
subList
public List<DmnDecisionRuleResult> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceList<DmnDecisionRuleResult>
-
asUnmodifiableList
protected List<DmnDecisionRuleResult> asUnmodifiableList()
-
wrap
public static DmnDecisionTableResultImpl wrap(DmnDecisionResult decisionResult)
-
-