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 DmnEngineLoggerLOGprotected 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:DmnDecisionTableResultReturns the firstDmnDecisionRuleResult.- Specified by:
getFirstResultin interfaceDmnDecisionTableResult- Returns:
- the first decision rule result or null if none exits
-
getSingleResult
public DmnDecisionRuleResult getSingleResult()
Description copied from interface:DmnDecisionTableResultReturns the singleDmnDecisionRuleResultof the result. Which asserts that only one decision rule result exist.- Specified by:
getSingleResultin interfaceDmnDecisionTableResult- Returns:
- the single decision rule result or null if none exists
-
collectEntries
public <T> List<T> collectEntries(String outputName)
Description copied from interface:DmnDecisionTableResultCollects 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:
collectEntriesin 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:DmnDecisionTableResultReturns 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:
getResultListin interfaceDmnDecisionTableResult- Returns:
- the list of all entry maps
- See Also:
DmnDecisionRuleResult.getEntryMap()
-
getSingleEntry
public <T> T getSingleEntry()
Description copied from interface:DmnDecisionTableResultReturns 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:
getSingleEntryin 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:DmnDecisionTableResultReturns 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:
getSingleEntryTypedin 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:
iteratorin interfaceCollection<DmnDecisionRuleResult>- Specified by:
iteratorin interfaceIterable<DmnDecisionRuleResult>- Specified by:
iteratorin interfaceList<DmnDecisionRuleResult>
-
size
public int size()
- Specified by:
sizein interfaceCollection<DmnDecisionRuleResult>- Specified by:
sizein interfaceList<DmnDecisionRuleResult>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<DmnDecisionRuleResult>- Specified by:
isEmptyin interfaceList<DmnDecisionRuleResult>
-
get
public DmnDecisionRuleResult get(int index)
- Specified by:
getin interfaceList<DmnDecisionRuleResult>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<DmnDecisionRuleResult>- Specified by:
containsin interfaceList<DmnDecisionRuleResult>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<DmnDecisionRuleResult>- Specified by:
toArrayin interfaceList<DmnDecisionRuleResult>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<DmnDecisionRuleResult>- Specified by:
toArrayin interfaceList<DmnDecisionRuleResult>
-
add
public boolean add(DmnDecisionRuleResult e)
- Specified by:
addin interfaceCollection<DmnDecisionRuleResult>- Specified by:
addin interfaceList<DmnDecisionRuleResult>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<DmnDecisionRuleResult>- Specified by:
removein interfaceList<DmnDecisionRuleResult>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<DmnDecisionRuleResult>- Specified by:
containsAllin interfaceList<DmnDecisionRuleResult>
-
addAll
public boolean addAll(Collection<? extends DmnDecisionRuleResult> c)
- Specified by:
addAllin interfaceCollection<DmnDecisionRuleResult>- Specified by:
addAllin interfaceList<DmnDecisionRuleResult>
-
addAll
public boolean addAll(int index, Collection<? extends DmnDecisionRuleResult> c)- Specified by:
addAllin interfaceList<DmnDecisionRuleResult>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<DmnDecisionRuleResult>- Specified by:
removeAllin interfaceList<DmnDecisionRuleResult>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<DmnDecisionRuleResult>- Specified by:
retainAllin interfaceList<DmnDecisionRuleResult>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<DmnDecisionRuleResult>- Specified by:
clearin interfaceList<DmnDecisionRuleResult>
-
set
public DmnDecisionRuleResult set(int index, DmnDecisionRuleResult element)
- Specified by:
setin interfaceList<DmnDecisionRuleResult>
-
add
public void add(int index, DmnDecisionRuleResult element)- Specified by:
addin interfaceList<DmnDecisionRuleResult>
-
remove
public DmnDecisionRuleResult remove(int index)
- Specified by:
removein interfaceList<DmnDecisionRuleResult>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOfin interfaceList<DmnDecisionRuleResult>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<DmnDecisionRuleResult>
-
listIterator
public ListIterator<DmnDecisionRuleResult> listIterator()
- Specified by:
listIteratorin interfaceList<DmnDecisionRuleResult>
-
listIterator
public ListIterator<DmnDecisionRuleResult> listIterator(int index)
- Specified by:
listIteratorin interfaceList<DmnDecisionRuleResult>
-
subList
public List<DmnDecisionRuleResult> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceList<DmnDecisionRuleResult>
-
asUnmodifiableList
protected List<DmnDecisionRuleResult> asUnmodifiableList()
-
wrap
public static DmnDecisionTableResultImpl wrap(DmnDecisionResult decisionResult)
-
-