I have a Map with String keys and each value is a List of a custom type.
I'm iterating through the Map keys and values and need to remove keys and List values at some point.
I want to do:
or
Is this likely to cause problems or can the IterableList handle these modifications made within a loop?
Thanks.
I'm iterating through the Map keys and values and need to remove keys and List values at some point.
I want to do:
B4X:
Type FileInfo( _
FileName As String, _
LastModified As Long _
)
Private FilesMap As Map
B4X:
For Each LocalFolderName As String In FilesMap.Keys
If blah blah Then
' remove map value
FilesMap.Remove(LocalFolderName)
End If
Next
or
B4X:
For Each LocalFolderName As String In FilesMap.Keys
Dim FileInfos As List=FilesMap.Get(LocalFolderName)
For Each FileInfo1 As FileInfo In FileInfos
If blah blah Then
' remove value from List where List is Map value
FileInfos.RemoveAt(FileInfos.IndexOf(FileInfo1))
End If
Next
Next
Is this likely to cause problems or can the IterableList handle these modifications made within a loop?
Thanks.