corda / net.corda.core.contracts / SourceAndAmount

SourceAndAmount

data class SourceAndAmount<T : Any, out P : Any>

Simple data class to associate the origin, owner, or holder of a particular Amount object.

Parameters

P - Any class type that can disambiguate where the amount came from.

T - The token type of the underlying Amount.

Constructors

<init>

SourceAndAmount(source: P, amount: Amount<T>, ref: Any? = null)

Simple data class to associate the origin, owner, or holder of a particular Amount object.

Properties

amount

val amount: Amount<T>

the Amount of asset available.

ref

val ref: Any?

is an optional field used for housekeeping in the caller. e.g. to point back at the original Vault state objects.

source

val source: P

the holder of the Amount.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.