Interface IWorld
An interface to manipulate an world state with maintaining Delta.
It is like a map which is virtually initialized such that every possible Address exists and is mapped to null. That means that:
Inherited Members
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public interface IWorld : IWorldState
Remarks
This interface is immutable. SetAccount(Address, IAccount) method does not manipulate the instance, but returns a new IWorld instance with updated states.
Properties
| Improve this Doc View SourceDelta
Declaration
IWorldDelta Delta { get; }
Property Value
Type | Description |
---|---|
IWorldDelta |
Remarks
This interface is immutable. SetAccount(Address, IAccount) method does not manipulate the instance, but returns a new IWorld instance with updated states.
Methods
| Improve this Doc View SourceGetAccount(Address)
Gets the IAccount of the given address
.
Declaration
IAccount GetAccount(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the world to get its state. |
Returns
Type | Description |
---|---|
IAccount | The IAccount of the given |
Remarks
This interface is immutable. SetAccount(Address, IAccount) method does not manipulate the instance, but returns a new IWorld instance with updated states.
SetAccount(Address, IAccount)
Creates a new instance of IWorld with given address
set to given account
.
Declaration
IWorld SetAccount(Address address, IAccount account)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address for which to set
given |
IAccount | account | The new IAccount to set to
given |
Returns
Type | Description |
---|---|
IWorld | A new IWorld instance where the account state of given
|
Remarks
This method does not manipulate the instance, but returns a new IWorld instance with an updated world state instead.