/** * Connects the primitive. * * @return a future to be completed once the primitive has been connected */ @SuppressWarnings("unchecked") public CompletableFuture<A> connect() { return registry.createPrimitive(name(), type()) .thenApply(v -> (A) this); }