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