MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / fromArray

Method fromArray

src/main/java/io/reactivex/rxjava3/core/Flowable.java:2185–2199  ·  view source on GitHub ↗

Converts an array into a Publisher that emits the items in the array. Backpressure: The operator honors backpressure from downstream and ite

(@NonNull T... items)

Source from the content-addressed store, hash-verified

2183 * @see <a href="http://reactivex.io/documentation/operators/from.html">ReactiveX operators documentation: From</a>
2184 */
2185 @CheckReturnValue
2186 @NonNull
2187 @BackpressureSupport(BackpressureKind.FULL)
2188 @SchedulerSupport(SchedulerSupport.NONE)
2189 @SafeVarargs
2190 public static <@NonNull T> Flowable<T> fromArray(@NonNull T... items) {
2191 Objects.requireNonNull(items, "items is null");
2192 if (items.length == 0) {
2193 return empty();
2194 }
2195 if (items.length == 1) {
2196 return just(items[0]);
2197 }
2198 return RxJavaPlugins.onAssembly(new FlowableFromArray<>(items));
2199 }
2200
2201 /**
2202 * Returns a {@code Flowable} that, when a {@link Subscriber} subscribes to it, invokes a function you specify and then

Callers 15

setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95

Calls 3

emptyMethod · 0.95
justMethod · 0.95
onAssemblyMethod · 0.95

Tested by 15

syncArrayMethod · 0.76
syncArrayHiddenMethod · 0.76
fromArrayMethod · 0.76
justWithSchedulerMethod · 0.76
fromArrayOneIsNullMethod · 0.76
publisherNormalMethod · 0.76
publisherErrorMethod · 0.76
publisherDelayErrorMethod · 0.76