LinkedIdList.sol
Last updated
Last updated
Marks the beginning of the list.
Unrealistic to have that many ids.
Modifier to guarantee the given new id is valid.
Modifier to guarantee the given id is valid.
Modifier to guarantee the given position is valid.
Modifier to guarantee the given ids are consecutive.
prevId
is checked by consecutiveId to be valid
should never be called more than once
Returns the last id in
lists the ids contained in the linked list.
Parameters
self
List
The linked List from where the ids should be listed.
Returns
<none>
uint256[]
array of ids that are contained in the list
Returns whether id is in list and not Sentinel
Parameters
self
List
The linked List from where the ids should be listed.
id
uint256
The id to check.
Id and prevId can be _SENTINEL
Parameters
self
List
The linked List from where the ids should be listed.
id
uint256
The id to check.
Id and nextId can be _SENTINEL
Parameters
self
List
The linked List from which to get the next id.
id
uint256
The id to check.
Add To list at last position
Parameters
self
List
The linked List to which to add the id.
id
uint256
The id to add.
Remove Id from list and decrease size.
Parameters
self
List
The linked List from which to remove the id.
prevId
uint256
The id of the previous id.
id
uint256
The id to remove.
Move id in list
Parameters
self
List
The linked List in which to move the id.
id
uint256
The id to move.
prevId
uint256
The id of the previous id.
idToPositionAfter
uint256
The id to position after.
Given id invalid.
Given new id invalid.
Given position in list is invalid.
Given ids are not consecutive.
Given ids are not consecutive.
Struct used to store information about an element in the list.
Properties
size
uint256
last
uint256
list
mapping(uint256 => uint256)