@Override
	public void writeExternal(final ObjectOutput out) throws IOException {
		out.writeByte(_type);
		switch (_type) {
			case EVOLUTION_DURATIONS -> ((EvolutionDurations)_object).write(out);
			case EVOLUTION_INIT -> ((EvolutionInit<?>)_object).write(out);
			case EVOLUTION_PARAMS -> ((EvolutionParams<?, ?>)_object).write(out);
			case EVOLUTION_RESULT -> ((EvolutionResult<?, ?>)_object).write(out);
			case EVOLUTION_START -> ((EvolutionStart<?, ?>)_object).write(out);
			default -> throw new StreamCorruptedException("Unknown serialized type.");
		}
	}
Creates an instance for serialization.

@param type  the type
@param object  the object
jenetics/src/main/java/io/jenetics/engine/SerialProxy.java