public int loadData(int size){
  List<String> list=new ArrayList<>();
  for (int i=0; i < size; i++)   list.add("" + size);
  return list.size();
}

public int loadData ( int size ) { List < String > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < size ; i ++ ) list . add ( "" + size ) ; return list . size ( ) ; }
public void optional ( ) { string prefix = " file " ; list < string > data ; for ( int i = 0 ; i < 100 ; i + + ) { string nextfile = prefix + i ; data . add ( loadstr ( nextfile ) ) ; } stream . iterate ( 0 , i - > i + 1 ) . limit ( 100 ) . map ( i - > " prefix " + i ) . map ( this : : loadstr ) . collect ( collectors . tolist ( ) ) ; new lazyreact ( ) . of ( 1 , 2 , 3 , 4 ) . map ( this : : load ) . foreach ( this : : save ) ; reactiveseq . of ( 1 , 2 , 3 ) . schedule ( " * * * * * ? " , executors . newscheduledthreadpool ( 1 ) ) . connect ( ) . debounce ( 1 , timeunit . seconds ) . foreach ( system . out : : println ) ; reactiveseq . of ( 1 , 2 , 3 , 4 ) . futureoperations ( executors . newfixedthreadpool ( 1 ) ) . foreach ( this : : expensiveop ) ; subscription s = reactiveseq . of ( 1 , 2 , 3 , 4 ) . foreachxevents ( 2 , system . out : : println , system . err : : println , ( ) - > system . out . println ( " complete " ) ) ; s . request ( 2 ) ; seqsubscriber < integer > sub = seqsubscriber . subscriber ( ) ; flux . just ( 1 , 2 , 3 , 4 ) . map ( i - > i * 2 ) . subscribe ( sub ) ; reactiveseq < integer > connected = sub . stream ( ) ; reactiveseq . of ( 1 , 2 , 3 ) . map ( this : : load ) . recover ( e - > " default value " ) . retry ( this : : unreliablemethod ) ; completablefuture f ; f . then seq . of ( " a " , " b " , " c " , " d " ) . map ( string : : touppercase ) . zipwithindex ( ) . filter ( t - > t . v2 % 2 = = 0 ) . sliding ( 3 ) . duplicate ( ) ; optional < integer > input ; optional < integer > times2 = input . map ( i - > i * 2 ) ; queuefactories . < data > boundedqueue ( 100 ) . build ( ) . futurestream ( ) . map ( this : : process ) . run ( ) ; } public void stream ( ) { stream < integer > input ; stream < integer > times2 = input . map ( i - > i * 2 ) ; } public void future ( ) { completablefuture < integer > input ; completablefuture < integer > times2 = input . thenapply ( i - > i * 2 ) ; } public void datetime ( ) { localdate date = localdate . of ( 2016 , 9 , 18 ) ; boolean later = localdate . now ( ) . isafter ( date ) ; } seq . of ( 1 , 2 , 4 ) . rightouterjoin ( seq . of ( 1 , 2 , 3 ) , ( a , b ) - > a = = b ) ; reactiveseq . of ( 6 , 5 , 2 , 1 ) . map ( e - > e * 100 ) . filter ( e - > e < 551 ) . futureoperations ( executors . newfixedthreadpool ( 1 ) ) . foreach ( e - > { system . out . println ( " element " + e + " on thread " + thread . currentthread ( ) . getid ( ) ) ; } ) ;
