removeSlot method
int
removeSlot(
- int entityIndex
)
Implementation
@protected
int removeSlot(int entityIndex) {
final dense = denseIndexOf(entityIndex);
if (dense < 0) return -1;
final last = _length - 1;
if (dense != last) {
final movedEntity = _denseEntities[last];
_denseEntities[dense] = movedEntity;
_sparse[movedEntity] = dense + 1;
movePayload(last, dense);
}
_sparse[entityIndex] = 0;
_membership?.remove(entityIndex, _membershipId);
_length = last;
clearPayload(last);
bumpRevision();
_changeListener?.rowChanged(entityIndex);
return dense;
}