P
- Any class type that can disambiguate where the amount came from.T
- The token type of the underlying class Amount
.public class SourceAndAmount<T,P>
Simple data class to associate the origin, owner, or holder of a particular Amount object.
Constructor and Description |
---|
SourceAndAmount(P source,
Amount<T> amount,
java.lang.Object ref)
Simple data class to associate the origin, owner, or holder of a particular Amount object.
|
Modifier and Type | Method and Description |
---|---|
P |
component1()
the holder of the Amount.
|
Amount<T> |
component2()
the Amount of asset available.
|
java.lang.Object |
component3()
is an optional field used for housekeeping in the caller.
|
SourceAndAmount<T,P> |
copy(P source,
Amount<T> amount,
java.lang.Object ref)
Simple data class to associate the origin, owner, or holder of a particular Amount object.
|
boolean |
equals(java.lang.Object p) |
Amount<T> |
getAmount()
the Amount of asset available.
|
java.lang.Object |
getRef()
is an optional field used for housekeeping in the caller.
|
P |
getSource()
the holder of the Amount.
|
int |
hashCode() |
java.lang.String |
toString() |
public SourceAndAmount(P source, Amount<T> amount, 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.public P getSource()
the holder of the Amount.
public Amount<T> getAmount()
the Amount of asset available.
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.
public P component1()
the holder of the Amount.
public Amount<T> component2()
the Amount of asset available.
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.
public SourceAndAmount<T,P> copy(P source, Amount<T> amount, java.lang.Object ref)
Simple data class to associate the origin, owner, or holder of a particular Amount object.
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)