test_class.file: cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/StreamFlatMappingSpliteratorTest.java
test_class.identifier: StreamFlatMappingSpliteratorTest
test_case.body: @Test
      public void tryAdvance() throws Exception {
          StreamFlatMappingSpliterator<String, String> split = new StreamFlatMappingSpliterator<>(new DummySpliterator<String>(-1l, 1), s -> Stream.of(s));
  
          boolean called[] = {false};
          split.tryAdvance(e->called[0]=true);
          assertTrue(called[0]);
          called[0] = false;
          split.tryAdvance(e->called[0]=true);
          assertTrue(called[0]);
          called[0] = false;
          split.tryAdvance(e->called[0]=true);
          assertTrue(called[0]);
          called[0] = false;
          split.tryAdvance(e->called[0]=true);
          assertTrue(called[0]);
  
  
      }
test_case.class_method_signature: StreamFlatMappingSpliteratorTest.tryAdvance()
test_case.full_signature: @Test public void tryAdvance()
test_case.identifier: tryAdvance
test_case.invocations: of tryAdvance assertTrue tryAdvance assertTrue tryAdvance assertTrue tryAdvance assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void tryAdvance()
focal_class.declarator: source
focal_class.original_string: Spliterator<T> source;
focal_class.type: Spliterator<T>
focal_class.var_name: source
focal_class.declarator: mapper
focal_class.original_string: Function<? super T, ? extends Stream<? extends R>> mapper;
focal_class.type: Function<? super T, ? extends Stream<? extends R>>
focal_class.var_name: mapper
focal_class.declarator: active
focal_class.original_string: Spliterator<R> active;
focal_class.type: Spliterator<R>
focal_class.var_name: active
focal_class.file: cyclops/src/main/java/com/oath/cyclops/internal/stream/spliterators/StreamFlatMappingSpliterator.java
focal_class.identifier: StreamFlatMappingSpliterator
focal_class.interfaces: implements CopyableSpliterator<R>
focal_class.class_method_signature: StreamFlatMappingSpliterator.StreamFlatMappingSpliterator(final Spliterator<T> source, Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.full_signature: public  StreamFlatMappingSpliterator(final Spliterator<T> source, Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.identifier: StreamFlatMappingSpliterator
focal_class.modifiers: public
focal_class.parameters: (final Spliterator<T> source, Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.signature:  StreamFlatMappingSpliterator(final Spliterator<T> source, Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.class_method_signature: StreamFlatMappingSpliterator.compose(FunctionSpliterator<T2,T> fnS,Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.full_signature: public static StreamFlatMappingSpliterator<T2,R> compose(FunctionSpliterator<T2,T> fnS,Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.identifier: compose
focal_class.modifiers: public static
focal_class.parameters: (FunctionSpliterator<T2,T> fnS,Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.return: StreamFlatMappingSpliterator<T2,R>
focal_class.signature: StreamFlatMappingSpliterator<T2,R> compose(FunctionSpliterator<T2,T> fnS,Function<? super T, ? extends Stream<? extends R>> mapper)
focal_class.class_method_signature: StreamFlatMappingSpliterator.forEachRemaining(Consumer<? super R> action)
focal_class.full_signature: @Override public void forEachRemaining(Consumer<? super R> action)
focal_class.identifier: forEachRemaining
focal_class.modifiers: @Override public
focal_class.parameters: (Consumer<? super R> action)
focal_class.return: void
focal_class.signature: void forEachRemaining(Consumer<? super R> action)
focal_class.class_method_signature: StreamFlatMappingSpliterator.tryAdvance(Consumer<? super R> action)
focal_class.full_signature: @Override public boolean tryAdvance(Consumer<? super R> action)
focal_class.identifier: tryAdvance
focal_class.modifiers: @Override public
focal_class.parameters: (Consumer<? super R> action)
focal_class.return: boolean
focal_class.signature: boolean tryAdvance(Consumer<? super R> action)
focal_class.class_method_signature: StreamFlatMappingSpliterator.copy()
focal_class.full_signature: @Override public Spliterator<R> copy()
focal_class.identifier: copy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Spliterator<R>
focal_class.signature: Spliterator<R> copy()
focal_class.superclass: extends Spliterators.AbstractSpliterator<R>
focal_method.body: @Override
      public boolean tryAdvance(Consumer<? super R> action) {
  
          for(;;) {
              if (active != null) {
                  if(active.tryAdvance(action)){
                      return true;
                  }else{
                      active = null;
                  }
  
  
  
              }
              //next spliterator
              boolean advance = source.tryAdvance(t -> {
  
                  active = (Spliterator<R>) mapper.apply(t).spliterator();
  
  
  
              });
  
              if(!advance && active==null)
                  return false;
          }
  
      }
focal_method.class_method_signature: StreamFlatMappingSpliterator.tryAdvance(Consumer<? super R> action)
focal_method.full_signature: @Override public boolean tryAdvance(Consumer<? super R> action)
focal_method.identifier: tryAdvance
focal_method.invocations: tryAdvance tryAdvance spliterator apply
focal_method.modifiers: @Override public
focal_method.parameters: (Consumer<? super R> action)
focal_method.return: boolean
focal_method.signature: boolean tryAdvance(Consumer<? super R> action)