T - The token type of the underlying class Amount.
P - Any class type that can disambiguate where the amount came from.
public class SourceAndAmount<T,P>
Simple data class to associate the origin, owner, or holder of a particular Amount object.
public SourceAndAmount(@NotNull
P source,
@NotNull
Amount<T> amount,
@Nullable
java.lang.Object ref)
Simple data class to associate the origin, owner, or holder of a particular Amount object.
source - the holder of the Amount.amount - the Amount of asset available.ref - is an optional field used for housekeeping in the caller.e.g. to point back at the original Vault state objects.@NotNull public P getSource()
the holder of the Amount.
@NotNull public Amount<T> getAmount()
the Amount of asset available.
@Nullable public java.lang.Object getRef()
is an optional field used for housekeeping in the caller.
e.g. to point back at the original Vault state objects.
@NotNull public P component1()
the holder of the Amount.
@NotNull public Amount<T> component2()
the Amount of asset available.
@Nullable public java.lang.Object component3()
is an optional field used for housekeeping in the caller.
e.g. to point back at the original Vault state objects.
@NotNull public SourceAndAmount<T,P> copy(@NotNull P source, @NotNull Amount<T> amount, @Nullable java.lang.Object ref)
Simple data class to associate the origin, owner, or holder of a particular Amount object.
@NotNull public java.lang.String toString()
Simple data class to associate the origin, owner, or holder of a particular Amount object.
public int hashCode()
Simple data class to associate the origin, owner, or holder of a particular Amount object.
public boolean equals(@Nullable
java.lang.Object p)
Simple data class to associate the origin, owner, or holder of a particular Amount object.