units

private var units: List<MapUnit>

We never add or remove from here directly, could cause comodification problems. Instead, we create a copy list with the change, and replace this list. The other solution, casting toList() every "get", has a performance cost

Sources

jvm source
Link copied to clipboard