copy

abstract fun copy(children: List<E>): GroupEntity<E>

Returns this entity rebuilt around children — the hook every group-preserving operation returns through, re-abstracted with typed children so each entity class must implement it.

The implementation rebuilds an instance of the entity's own class around children and carries its facts across. The result's runtime class must equal the receiver's — the operations check it and fail with a named error otherwise.

Return

The rebuilt entity — the receiver's own class, facts carried.

Parameters

children

The replacement children.


override fun copy(children: List<Node>, bounds: SceneBounds?): GroupEntity<E>

Returns this entity rebuilt around children through the typed hook; bounds is not consulted — the rebuilt entity carries whatever bounds its own class sets.

Return

The rebuilt entity — the receiver's own class, facts carried.

Parameters

children

The replacement children.

bounds

Ignored; an entity's bounds are its own class's concern.