This document describes how to implement ArrayList in a block coding manner.
As of April 17, 2025, ArrayList's name has been changed to List.
Index
Definition of List
•
List is a data structure that uses continuous memory space to have data.
List Block
•
Introduces the blocks entered the List category of SyncTree NBlock.
1) List
•
Used to create (declare) an List data structure.
•
Click the
button to add or remove Value items.
•
Below is an example of the List block declaration.
2) Get Array Variable
•
Use to import the Value of List as a whole, or a specific Key.
•
Enter the variable name of the List object to import the information as the first factor.
•
From the second factor (Item Keys), enter the index of List to import Value within List as Integer.
•
If no Value is entered in Item Keys, Value is added after the last index in the List.
•
Click the
button to add or remove Value items.
•
If Item Keys is added, the index is sequentially searched in the nested List to find the value.
•
Below is an example of using Get List Block.
3) Add Array Variable
•
Adds a Value to List.
•
Enter the variable name of the List object to which you want to add information as the first factor.
•
Enter the Value to add to the Add value.
•
Click the
button to add or remove Item Keys.
•
If Item Keys is added, values are added by sequentially searching indexes in the nested List.
•
Below is an example of using Add Array Block.
4) Remove Array Variable
•
Remove Key and Value from List.
•
Enter the variable name of the List object to import the information as the first factor.
•
Click the
button to add or remove Item Keys.
•
From the second factor (Item Keys), enter the index of the Value to remove within the List.
•
If Item Keys is added, the index is sequentially searched in the nested List and values are removed.
•
Below is an example of using Remove Array Block.