Package com.daml.ledger.javaapi.data
Class TransactionUtils
java.lang.Object
com.daml.ledger.javaapi.data.TransactionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <WrappedEvent>
List<WrappedEvent>buildTree
(Transaction transaction, BiFunction<Event, List<WrappedEvent>, WrappedEvent> createWrappedEvent) Constructs a tree described by a transaction.
-
Method Details
-
buildTree
public static <WrappedEvent> List<WrappedEvent> buildTree(Transaction transaction, BiFunction<Event, List<WrappedEvent>, WrappedEvent> createWrappedEvent) Constructs a tree described by a transaction.- Type Parameters:
WrappedEvent
- the type of the wrapped events of the constructed tree- Parameters:
transaction
- the transactioncreateWrappedEvent
- the function that constructs a WrappedEvent node of the tree given the current node and its converted children as a list of WrappedEvents nodes- Returns:
- the list of the wrapped root events
-