@Override
	public void writeExternal(final ObjectOutput out) throws IOException {
		out.writeByte(_type);
		switch (_type) {
			case SIMPLE_INT_VEC -> ((SimpleIntVec)_object).write(out);
			case SIMPLE_LONG_VEC -> ((SimpleLongVec)_object).write(out);
			case SIMPLE_DOUBLE_VEC -> ((SimpleDoubleVec)_object).write(out);
			default -> throw new StreamCorruptedException("Unknown serialized type.");
		}
	}
Creates an instance for serialization.

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