Class CollectionWrapper
java.lang.Object
java.util.AbstractCollection<CollectionWrapper.Element>
com.codebarrel.automation.api.component.smartvalues.objectwrappers.CollectionWrapper
- All Implemented Interfaces:
InputRenderable,SmartValueWrapper,Iterable<CollectionWrapper.Element>,Collection<CollectionWrapper.Element>
public class CollectionWrapper
extends AbstractCollection<CollectionWrapper.Element>
implements InputRenderable, SmartValueWrapper
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCollectionWrapper(Collection<?> delegatedCollection, TimezoneProvider timezoneProvider, SafeReflectionObjectHandler safeReflectionObjectHandler) -
Method Summary
Modifier and TypeMethodDescriptionasJsonObjectArray(String key) average()Example: {{issue.subtasks.Story Points.average}}avg()distinct()Example usage: Use it when you can have duplicates in a listfirst()get(int index) Collection<?> Deprecated.getFromEnd(int index) iterator()last()max()Example: {{issue.subtasks.Due date.max}}min()Example: {{issue.fixVersions.releaseDate.min}}reverse()intsize()sum()Example: {{issue.subtasks.Story Points.sum}}Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
CollectionWrapper
public CollectionWrapper(Collection<?> delegatedCollection, TimezoneProvider timezoneProvider, SafeReflectionObjectHandler safeReflectionObjectHandler)
-
-
Method Details
-
getDelegatedCollection
Deprecated.usegetWrappedValue()instead -
getWrappedValue
- Specified by:
getWrappedValuein interfaceSmartValueWrapper
-
asJsonArray
-
asJsonStringArray
-
asJsonObjectArray
-
join
-
iterator
- Specified by:
iteratorin interfaceCollection<CollectionWrapper.Element>- Specified by:
iteratorin interfaceIterable<CollectionWrapper.Element>- Specified by:
iteratorin classAbstractCollection<CollectionWrapper.Element>
-
size
public int size()- Specified by:
sizein interfaceCollection<CollectionWrapper.Element>- Specified by:
sizein classAbstractCollection<CollectionWrapper.Element>
-
first
-
last
-
get
-
reverse
-
distinct
Example usage: Use it when you can have duplicates in a list
{{issue.comments.author.distinct)}} -
getFromEnd
-
toRenderedString
- Specified by:
toRenderedStringin interfaceInputRenderable
-
sum
Example: {{issue.subtasks.Story Points.sum}} -
avg
-
average
Example: {{issue.subtasks.Story Points.average}} -
max
Example: {{issue.subtasks.Due date.max}} -
min
Example: {{issue.fixVersions.releaseDate.min}}
-
getWrappedValue()instead