- Type Parameters:
T- type of wrapped data
- All Superinterfaces:
Lookup.Provider
- Enclosing class:
Data
A data holder used to wrap data of type T to be passed around a Pipe
graph.
Implementations of this interface are provided by the Data.Sink.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulate(List<Data.Packet<T>> packets) Accumulate data from the provided packets into this packet.voidApply a function to the data in the packet.voidclear()Clear the data in the packet.Create a packet compatible with the data in this packet.data()Access the data in the packet.voiddispose()Dispose of the data in this packet.booleanisCompatible(Data.Packet<T> packet) Check whether a packet is compatible with this packet.Methods inherited from interface org.praxislive.core.Lookup.Provider
getLookup
-
Method Details
-
data
T data()Access the data in the packet.- Returns:
- data
-
clear
void clear()Clear the data in the packet. This will use any clear function configured for the pipeline.- See Also:
-
apply
Apply a function to the data in the packet. If the function returns a different instance of data, the packet data will be replaced and the old data disposed. Disposal will be handled by any disposal function set on the pipeline.- Parameters:
operator- data function- See Also:
-
accumulate
Accumulate data from the provided packets into this packet. If the list contains this packet it will be ignored. Accumulation will be done using any accumulate function set on the pipeline.- Parameters:
packets- source packets- See Also:
-
isCompatible
Check whether a packet is compatible with this packet. If a packet is not compatible, it will be disposed and a new packet created. Compatibility will be checked using any compatibility function set on the pipeline.- Parameters:
packet- other packet- Returns:
- true if compatible
- See Also:
-
createPacket
Data.Packet<T> createPacket()Create a packet compatible with the data in this packet.- Returns:
- newly created packet
-
dispose
void dispose()Dispose of the data in this packet. The packet will not be usable after disposal. Disposal will be handled using any disposal function set on the pipeline.- See Also:
-