Package com.adobe.testing.s3mock.service
Object ServiceBase.Companion
-
- All Implemented Interfaces:
public class ServiceBase.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static ServiceBase.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final <T extends Any> List<T>mapContents(List<T> contents, Function1<T, T> transformer)final <T extends Any> List<T>filterBy(List<T> contents, Function1<T, String> selector, String compareTo)final <T extends Any> List<T>filterBy(List<T> contents, Function1<T, Integer> selector, Integer compareTo)final <T extends Any> List<T>filterBy(List<T> contents, Function1<T, String> selector, List<String> prefixes)final <T extends Any> List<String>collapseCommonPrefixes(String queryPrefix, String delimiter, List<T> contents, Function1<T, String> function)Collapse all elements with keys starting with some prefix up to the given delimiter into one prefix entry. -
-
Method Detail
-
mapContents
final <T extends Any> List<T> mapContents(List<T> contents, Function1<T, T> transformer)
-
filterBy
final <T extends Any> List<T> filterBy(List<T> contents, Function1<T, String> selector, String compareTo)
-
filterBy
final <T extends Any> List<T> filterBy(List<T> contents, Function1<T, Integer> selector, Integer compareTo)
-
filterBy
final <T extends Any> List<T> filterBy(List<T> contents, Function1<T, String> selector, List<String> prefixes)
-
collapseCommonPrefixes
final <T extends Any> List<String> collapseCommonPrefixes(String queryPrefix, String delimiter, List<T> contents, Function1<T, String> function)
Collapse all elements with keys starting with some prefix up to the given delimiter into one prefix entry. Collapsed elements are removed from the contents list.
- Parameters:
queryPrefix- the key prefix as specified in the list requestdelimiter- the delimiter used to separate a prefix from the rest of the object namecontents- the list of contents to use for collapsing the prefixesfunction- the function to apply on a content to extract the value to collapse the prefixes on
-
-
-
-