Package org.camunda.bpm.dmn.engine.impl
Class DmnDecisionTableResultImpl
- java.lang.Object
-
- org.camunda.bpm.dmn.engine.impl.DmnDecisionTableResultImpl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<DmnDecisionRuleResult>
,java.util.Collection<DmnDecisionRuleResult>
,java.util.List<DmnDecisionRuleResult>
,DmnDecisionTableResult
public class DmnDecisionTableResultImpl extends java.lang.Object implements DmnDecisionTableResult
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DmnEngineLogger
LOG
protected java.util.List<DmnDecisionRuleResult>
ruleResults
-
Constructor Summary
Constructors Constructor Description DmnDecisionTableResultImpl(java.util.List<DmnDecisionRuleResult> ruleResults)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, DmnDecisionRuleResult element)
boolean
add(DmnDecisionRuleResult e)
boolean
addAll(int index, java.util.Collection<? extends DmnDecisionRuleResult> c)
boolean
addAll(java.util.Collection<? extends DmnDecisionRuleResult> c)
protected java.util.List<DmnDecisionRuleResult>
asUnmodifiableList()
void
clear()
<T> java.util.List<T>
collectEntries(java.lang.String outputName)
Collects the entries for a output name.boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
DmnDecisionRuleResult
get(int index)
DmnDecisionRuleResult
getFirstResult()
Returns the firstDmnDecisionRuleResult
.java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getResultList()
Returns the entries of all decision rule results.<T> T
getSingleEntry()
Returns the value of the single entry of the decision rule result.<T extends TypedValue>
TgetSingleEntryTyped()
Returns the typed value of the single entry of the decision rule result.DmnDecisionRuleResult
getSingleResult()
Returns the singleDmnDecisionRuleResult
of the result.int
indexOf(java.lang.Object o)
boolean
isEmpty()
java.util.Iterator<DmnDecisionRuleResult>
iterator()
int
lastIndexOf(java.lang.Object o)
java.util.ListIterator<DmnDecisionRuleResult>
listIterator()
java.util.ListIterator<DmnDecisionRuleResult>
listIterator(int index)
DmnDecisionRuleResult
remove(int index)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
DmnDecisionRuleResult
set(int index, DmnDecisionRuleResult element)
int
size()
java.util.List<DmnDecisionRuleResult>
subList(int fromIndex, int toIndex)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
java.lang.String
toString()
static DmnDecisionTableResultImpl
wrap(DmnDecisionResult decisionResult)
-
-
-
Field Detail
-
LOG
public static final DmnEngineLogger LOG
-
ruleResults
protected final java.util.List<DmnDecisionRuleResult> ruleResults
-
-
Constructor Detail
-
DmnDecisionTableResultImpl
public DmnDecisionTableResultImpl(java.util.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> java.util.List<T> collectEntries(java.lang.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 java.util.List<java.util.Map<java.lang.String,java.lang.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 java.util.Iterator<DmnDecisionRuleResult> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
iterator
in interfacejava.lang.Iterable<DmnDecisionRuleResult>
- Specified by:
iterator
in interfacejava.util.List<DmnDecisionRuleResult>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
size
in interfacejava.util.List<DmnDecisionRuleResult>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
isEmpty
in interfacejava.util.List<DmnDecisionRuleResult>
-
get
public DmnDecisionRuleResult get(int index)
- Specified by:
get
in interfacejava.util.List<DmnDecisionRuleResult>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
contains
in interfacejava.util.List<DmnDecisionRuleResult>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
toArray
in interfacejava.util.List<DmnDecisionRuleResult>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
toArray
in interfacejava.util.List<DmnDecisionRuleResult>
-
add
public boolean add(DmnDecisionRuleResult e)
- Specified by:
add
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
add
in interfacejava.util.List<DmnDecisionRuleResult>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
remove
in interfacejava.util.List<DmnDecisionRuleResult>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
containsAll
in interfacejava.util.List<DmnDecisionRuleResult>
-
addAll
public boolean addAll(java.util.Collection<? extends DmnDecisionRuleResult> c)
- Specified by:
addAll
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
addAll
in interfacejava.util.List<DmnDecisionRuleResult>
-
addAll
public boolean addAll(int index, java.util.Collection<? extends DmnDecisionRuleResult> c)
- Specified by:
addAll
in interfacejava.util.List<DmnDecisionRuleResult>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
removeAll
in interfacejava.util.List<DmnDecisionRuleResult>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
retainAll
in interfacejava.util.List<DmnDecisionRuleResult>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<DmnDecisionRuleResult>
- Specified by:
clear
in interfacejava.util.List<DmnDecisionRuleResult>
-
set
public DmnDecisionRuleResult set(int index, DmnDecisionRuleResult element)
- Specified by:
set
in interfacejava.util.List<DmnDecisionRuleResult>
-
add
public void add(int index, DmnDecisionRuleResult element)
- Specified by:
add
in interfacejava.util.List<DmnDecisionRuleResult>
-
remove
public DmnDecisionRuleResult remove(int index)
- Specified by:
remove
in interfacejava.util.List<DmnDecisionRuleResult>
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf
in interfacejava.util.List<DmnDecisionRuleResult>
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf
in interfacejava.util.List<DmnDecisionRuleResult>
-
listIterator
public java.util.ListIterator<DmnDecisionRuleResult> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<DmnDecisionRuleResult>
-
listIterator
public java.util.ListIterator<DmnDecisionRuleResult> listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List<DmnDecisionRuleResult>
-
subList
public java.util.List<DmnDecisionRuleResult> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<DmnDecisionRuleResult>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
asUnmodifiableList
protected java.util.List<DmnDecisionRuleResult> asUnmodifiableList()
-
wrap
public static DmnDecisionTableResultImpl wrap(DmnDecisionResult decisionResult)
-
-