/** * Adapt the given instance to a Reactive Streams {@code Publisher}. * @param source the source object to adapt from; if the given object is * {@code null}, {@link ReactiveTypeDescriptor#getEmptyValue()} is used. * @return the Publisher representing the adaptation */ @SuppressWarnings("unchecked") public <T> Publisher<T> toPublisher(@Nullable Object source) { if (source == null) { source = getDescriptor().getEmptyValue(); } return (Publisher<T>) this.toPublisherFunction.apply(source); }
/** * Adapt the given instance to a Reactive Streams {@code Publisher}. * @param source the source object to adapt from; if the given object is * {@code null}, {@link ReactiveTypeDescriptor#getEmptyValue()} is used. * @return the Publisher representing the adaptation */ @SuppressWarnings("unchecked") public <T> Publisher<T> toPublisher(@Nullable Object source) { if (source == null) { source = getDescriptor().getEmptyValue(); } return (Publisher<T>) this.toPublisherFunction.apply(source); }
/** * Adapt the given instance to a Reactive Streams {@code Publisher}. * @param source the source object to adapt from; if the given object is * {@code null}, {@link ReactiveTypeDescriptor#getEmptyValue()} is used. * @return the Publisher representing the adaptation */ @SuppressWarnings("unchecked") public <T> Publisher<T> toPublisher(@Nullable Object source) { if (source == null) { source = getDescriptor().getEmptyValue(); } return (Publisher<T>) this.toPublisherFunction.apply(source); }
/** * Adapt the given instance to a Reactive Streams {@code Publisher}. * @param source the source object to adapt from; if the given object is * {@code null}, {@link ReactiveTypeDescriptor#getEmptyValue()} is used. * @return the Publisher representing the adaptation */ @SuppressWarnings("unchecked") public <T> Publisher<T> toPublisher(@Nullable Object source) { if (source == null) { source = getDescriptor().getEmptyValue(); } return (Publisher<T>) this.toPublisherFunction.apply(source); }