本文整理了Java中java.util.Arrays.fill()
方法的一些代码示例,展示了Arrays.fill()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.fill()
方法的具体详情如下:
包路径:java.util.Arrays
类名称:Arrays
方法名:fill
[英]Fills the specified array with the specified element.
[中]用指定的元素填充指定的数组。
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public Iterable<Integer> apply(Object v) throws Exception {
Integer[] array = new Integer[1000 * 1000];
Arrays.fill(array, 1);
return Arrays.asList(array);
}
})
代码示例来源:origin: ReactiveX/RxJava
@Override
public void cancel() {
if (!cancelled) {
cancelled = true;
cancelAll();
if (getAndIncrement() == 0) {
Arrays.fill(lists, null);
}
}
}
代码示例来源:origin: ReactiveX/RxJava
@Test
public void manySources() {
Observable<?>[] a = new Observable[32];
Arrays.fill(a, Observable.never());
a[31] = Observable.just(1);
Observable.amb(Arrays.asList(a))
.test()
.assertResult(1);
}
代码示例来源:origin: ReactiveX/RxJava
@Test
public void manySources() {
Flowable<?>[] a = new Flowable[32];
Arrays.fill(a, Flowable.never());
a[31] = Flowable.just(1);
Flowable.amb(Arrays.asList(a))
.test()
.assertResult(1);
}
代码示例来源:origin: ReactiveX/RxJava
@Test
public void manySources() {
Single<?>[] sources = new Single[32];
Arrays.fill(sources, Single.never());
sources[31] = Single.just(31);
Single.amb(Arrays.asList(sources))
.test()
.assertResult(31);
}
代码示例来源:origin: ReactiveX/RxJava
@Test
public void mergeALot() {
@SuppressWarnings("unchecked")
Maybe<Integer>[] sources = new Maybe[Flowable.bufferSize() * 2];
Arrays.fill(sources, Maybe.just(1));
Maybe.mergeArray(sources)
.test()
.assertSubscribed()
.assertValueCount(sources.length)
.assertNoErrors()
.assertComplete();
}
内容来源于网络,如有侵权,请联系作者删除!