Package org.camunda.bpm.dmn.engine.impl
Class DmnDecisionResultImpl
- java.lang.Object
-
- org.camunda.bpm.dmn.engine.impl.DmnDecisionResultImpl
-
- All Implemented Interfaces:
Serializable
,Iterable<DmnDecisionResultEntries>
,Collection<DmnDecisionResultEntries>
,List<DmnDecisionResultEntries>
,DmnDecisionResult
public class DmnDecisionResultImpl extends Object implements DmnDecisionResult
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DmnEngineLogger
LOG
protected List<DmnDecisionResultEntries>
ruleResults
-
Constructor Summary
Constructors Constructor Description DmnDecisionResultImpl(List<DmnDecisionResultEntries> 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<DmnDecisionResultEntries> ruleResults
-
-
Constructor Detail
-
DmnDecisionResultImpl
public DmnDecisionResultImpl(List<DmnDecisionResultEntries> ruleResults)
-
-
Method Detail
-
getFirstResult
public DmnDecisionResultEntries getFirstResult()
Description copied from interface:DmnDecisionResult
Returns the firstDmnDecisionResultEntries
.- Specified by:
getFirstResult
in interfaceDmnDecisionResult
- Returns:
- the first decision result or null if none exits
-
getSingleResult
public DmnDecisionResultEntries getSingleResult()
Description copied from interface:DmnDecisionResult
Returns the singleDmnDecisionResultEntries
of the result. Asserts that only one decision result exist.- Specified by:
getSingleResult
in interfaceDmnDecisionResult
- Returns:
- the single decision result or null if none exists
-
collectEntries
public <T> List<T> collectEntries(String outputName)
Description copied from interface:DmnDecisionResult
Collects the entries for a output name. The list will contain entries for the output name of everyDmnDecisionResultEntries
. Note that the list may contains less entries than decision results if an output does not contain a value for the output name.- Specified by:
collectEntries
in interfaceDmnDecisionResult
- Type Parameters:
T
- the type of the 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:DmnDecisionResult
Returns the entries of all decision results. For every decision result a map of the output names and corresponding entries is returned.- Specified by:
getResultList
in interfaceDmnDecisionResult
- Returns:
- the list of all entry maps
- See Also:
DmnDecisionResultEntries.getEntryMap()
-
getSingleEntry
public <T> T getSingleEntry()
Description copied from interface:DmnDecisionResult
Returns the value of the single entry of the decision result. Asserts that only one decision result with a single entry exist.- Specified by:
getSingleEntry
in interfaceDmnDecisionResult
- Type Parameters:
T
- the type of the result entry- Returns:
- the value of the single result entry or null if none exists
- See Also:
DmnDecisionResult.getSingleEntryTyped()
-
getSingleEntryTyped
public <T extends TypedValue> T getSingleEntryTyped()
Description copied from interface:DmnDecisionResult
Returns the typed value of the single entry of the decision result. Asserts that only one decision result with a single entry exist.- Specified by:
getSingleEntryTyped
in interfaceDmnDecisionResult
- 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:
DmnDecisionResult.getSingleEntry()
-
iterator
public Iterator<DmnDecisionResultEntries> iterator()
- Specified by:
iterator
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
iterator
in interfaceIterable<DmnDecisionResultEntries>
- Specified by:
iterator
in interfaceList<DmnDecisionResultEntries>
-
size
public int size()
- Specified by:
size
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
size
in interfaceList<DmnDecisionResultEntries>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
isEmpty
in interfaceList<DmnDecisionResultEntries>
-
get
public DmnDecisionResultEntries get(int index)
- Specified by:
get
in interfaceList<DmnDecisionResultEntries>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
contains
in interfaceList<DmnDecisionResultEntries>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
toArray
in interfaceList<DmnDecisionResultEntries>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
toArray
in interfaceList<DmnDecisionResultEntries>
-
add
public boolean add(DmnDecisionResultEntries e)
- Specified by:
add
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
add
in interfaceList<DmnDecisionResultEntries>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
remove
in interfaceList<DmnDecisionResultEntries>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
containsAll
in interfaceList<DmnDecisionResultEntries>
-
addAll
public boolean addAll(Collection<? extends DmnDecisionResultEntries> c)
- Specified by:
addAll
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
addAll
in interfaceList<DmnDecisionResultEntries>
-
addAll
public boolean addAll(int index, Collection<? extends DmnDecisionResultEntries> c)
- Specified by:
addAll
in interfaceList<DmnDecisionResultEntries>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
removeAll
in interfaceList<DmnDecisionResultEntries>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
retainAll
in interfaceList<DmnDecisionResultEntries>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<DmnDecisionResultEntries>
- Specified by:
clear
in interfaceList<DmnDecisionResultEntries>
-
set
public DmnDecisionResultEntries set(int index, DmnDecisionResultEntries element)
- Specified by:
set
in interfaceList<DmnDecisionResultEntries>
-
add
public void add(int index, DmnDecisionResultEntries element)
- Specified by:
add
in interfaceList<DmnDecisionResultEntries>
-
remove
public DmnDecisionResultEntries remove(int index)
- Specified by:
remove
in interfaceList<DmnDecisionResultEntries>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interfaceList<DmnDecisionResultEntries>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<DmnDecisionResultEntries>
-
listIterator
public ListIterator<DmnDecisionResultEntries> listIterator()
- Specified by:
listIterator
in interfaceList<DmnDecisionResultEntries>
-
listIterator
public ListIterator<DmnDecisionResultEntries> listIterator(int index)
- Specified by:
listIterator
in interfaceList<DmnDecisionResultEntries>
-
subList
public List<DmnDecisionResultEntries> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceList<DmnDecisionResultEntries>
-
asUnmodifiableList
protected List<DmnDecisionResultEntries> asUnmodifiableList()
-
-