copy

open fun copy(dipole: Dipole): Dipole

Returns this object rebuilt around the replacement geometry dipole — the hook the shape-preserving operations return through.

Every operation that moves a dipole computes its result as a plain Dipole and returns it through this hook. This base implementation returns dipole itself; a subclass overrides it to rebuild an instance of its own class around dipole, and every such operation then comes back as that class. The result's runtime class must equal the receiver's — the operations check it and fail with a named error when a subclass misses the override.

Return

dipole itself; an override returns its own class rebuilt around dipole.

Parameters

dipole

The replacement geometry.