本文整理了Java中cyclops.reactive.ReactiveSeq.toArray
方法的一些代码示例,展示了ReactiveSeq.toArray
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReactiveSeq.toArray
方法的具体详情如下:
包路径:cyclops.reactive.ReactiveSeq
类名称:ReactiveSeq
方法名:toArray
暂无
代码示例来源:origin: aol/micro-server
@Override
public Class[] classes(Config config, Class... classes) {
List<Class> classList = new ArrayList<Class>();
classList.addAll(Arrays.asList(classes));
return ReactiveSeq.fromIterable(new JerseyApplication(classList).classes).appendAll(classList)
.toArray(i->new Class[i]);
}
代码示例来源:origin: aol/micro-server
public ApplicationContext createSpringContext() {
try {
ApplicationContext springContext = springBuilder.createSpringApp(config, classes.stream().toArray(i->new Class[classes.size()]));
return springContext;
} catch (Exception e) {
logger.error(InternalErrorCode.STARTUP_FAILED_SPRING_INITIALISATION.toString(), e.getMessage());
ExceptionSoftener.throwSoftenedException(e);
}
return null;
}
public Class[] classes() {
代码示例来源:origin: aol/micro-server
public Class[] classes() {
return springBuilder.classes(config, classes.stream().toArray(i->new Class[classes.size()]));
}
代码示例来源:origin: aol/micro-server
public MicroserverPlugins(Module mod, Class... classes){
this.classes = ReactiveSeq.of(classes)
.appendStream(ReactiveSeq.of(new MicroserverApp(extractClass(),mod).classes))
.toArray(i->new Class[i]);
}
public Class[] classes(){
代码示例来源:origin: aol/micro-server
public MicroserverPlugins(Class... classes){
ReactiveSeq<Class> rs= classes!=null ? ReactiveSeq.of(classes) : ReactiveSeq.empty();
this.classes = rs
.appendStream(ReactiveSeq.of(new MicroserverApp(true,extractClass(),()->"").classes))
.toArray(i->new Class[i]);
}
public MicroserverPlugins(Module mod, Class... classes){
代码示例来源:origin: aol/cyclops
/**
* Generate the permutations based on values in the ReactiveSeq Makes use of
* Streamable to store intermediate stages in a toX
*
*
* @return Permutations from this ReactiveSeq
*/
@Override
default ReactiveSeq<ReactiveSeq<T>> permutations() {
return Streams.permutations(toArray());
}
代码示例来源:origin: aol/cyclops
@Override
public Object[] toArray() {
return host.stream().toArray();
}
代码示例来源:origin: aol/cyclops
default <A> A[] toArray(final IntFunction<A[]> generator) {
return this.stream().toArray(generator);
}
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(ReactiveSeq.of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArray() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray()[0]));
}
@Test
代码示例来源:origin: aol/cyclops
@Test
public void testToArrayGenerator() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray(it->new Integer[it])[0]));
}
代码示例来源:origin: aol/cyclops
@Test
public void testToArrayGenerator() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray(it->new Integer[it])[0]));
}
代码示例来源:origin: aol/cyclops
@Test
public void testToArrayGenerator() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray(it->new Integer[it])[0]));
}
代码示例来源:origin: aol/cyclops
@Test
public void testToArrayGenerator() {
assertThat( Arrays.asList(1,2,3,4,5),hasItem(of(1,5,3,4,2).toArray(it->new Integer[it])[0]));
}
代码示例来源:origin: aol/cyclops
@Test
public void prependAll2() {
assertThat(empty.prependAll(str.stream().toArray(i->new Character[i])),equalTo(str));
assertThat(str.prependAll(empty.stream().toArray(i->new Character[i])),equalTo(str));
assertThat(str.prependAll(str.stream().toArray(i->new Character[i])).toString(),equalTo("hello worldhello world"));
assertThat(str.prependAll(LazyString.of("bob").stream().toArray(i->new Character[i])).toString(),equalTo("bobhello world"));
}
代码示例来源:origin: aol/cyclops
@Test
public void appendAll2() {
assertThat(empty.appendAll(str.toArray(i->new Character[i])),equalTo(str));
assertThat(str.appendAll(empty.toArray(i->new Character[i])),equalTo(str));
assertThat(str.appendAll(str.toArray(i->new Character[i])).toString(),equalTo("hello worldhello world"));
assertThat(str.appendAll(LazyString.of("bob").stream().toArray(i->new Character[i])).toString(),equalTo("hello worldbob"));
}
内容来源于网络,如有侵权,请联系作者删除!