congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FlowGrouping.then
Code IndexAdd Tabnine to your IDE (free)

How to use
then
method
in
com.wizzardo.tools.collections.flow.FlowGrouping

Best Java code snippets using com.wizzardo.tools.collections.flow.FlowGrouping.then (Showing top 16 results out of 315)

origin: com.wizzardo.tools/tools-collections

public FlowGrouping<K, T, B, B> each(final ConsumerWithInt<? super B> consumer) {
  return then(new FlowGrouping<K, T, B, B>(groups) {
    int index = 0;
    @Override
    public void process(B b) {
      consumer.consume(index++, b);
      FlowProcessor<B, ?> child = this.child;
      if (child != null)
        child.process(b);
    }
  });
}
origin: wizzardo/tools

public FlowGrouping<K, T, B, B> each(final ConsumerWithInt<? super B> consumer) {
  return then(new FlowGrouping<K, T, B, B>(groups) {
    int index = 0;
    @Override
    public void process(B b) {
      consumer.consume(index++, b);
      FlowProcessor<B, ?> child = this.child;
      if (child != null)
        child.process(b);
    }
  });
}
origin: com.wizzardo.tools/tools-collections

@Override
public FlowGrouping<K, T, B, B> each(final Consumer<? super B> consumer) {
  return this.then(new FlowGrouping<K, T, B, B>(groups) {
    @Override
    public void process(B b) {
      consumer.consume(b);
      FlowProcessor<B, ?> child = this.child;
      if (child != null)
        child.process(b);
    }
  });
}
origin: wizzardo/tools

@Override
public FlowGrouping<K, T, B, B> each(final Consumer<? super B> consumer) {
  return this.then(new FlowGrouping<K, T, B, B>(groups) {
    @Override
    public void process(B b) {
      consumer.consume(b);
      FlowProcessor<B, ?> child = this.child;
      if (child != null)
        child.process(b);
    }
  });
}
origin: com.wizzardo.tools/tools-collections

@Override
public FlowGrouping<K, T, B, B> filter(final Filter<? super B> filter) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    @Override
    public void process(B b) {
      if (filter.allow(b)) {
        groups.put(b.getKey(), b);
        child.process(b);
      }
    }
  });
}
origin: wizzardo/tools

@Override
public FlowGrouping<K, T, B, B> filter(final Filter<? super B> filter) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    @Override
    public void process(B b) {
      if (filter.allow(b)) {
        groups.put(b.getKey(), b);
        child.process(b);
      }
    }
  });
}
origin: com.wizzardo.tools/tools-collections

@Override
public FlowGrouping<K, T, B, B> skip(final int number) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    public int counter;
    @Override
    public void process(B b) {
      if (counter >= number)
        child.process(b);
      else
        counter++;
    }
  });
}
origin: wizzardo/tools

@Override
public FlowGrouping<K, T, B, B> skip(final int number) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    public int counter;
    @Override
    public void process(B b) {
      if (counter >= number)
        child.process(b);
      else
        counter++;
    }
  });
}
origin: wizzardo/tools

@Override
public FlowGrouping<K, T, B, B> limit(final int number) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    public int counter;
    @Override
    public void process(B b) {
      if (counter < number) {
        counter++;
        child.process(b);
      }
    }
  });
}
origin: com.wizzardo.tools/tools-collections

@Override
public FlowGrouping<K, T, B, B> limit(final int number) {
  return this.then(new FlowGrouping<K, T, B, B>(new LinkedHashMap<K, FlowGroup<K, T>>()) {
    public int counter;
    @Override
    public void process(B b) {
      if (counter < number) {
        counter++;
        child.process(b);
      }
    }
  });
}
origin: wizzardo/tools

  public Flow<T> merge() {
    return then(new FlowMerge<B, T>());
  }
}
origin: com.wizzardo.tools/tools-collections

  public Flow<T> merge() {
    return then(new FlowMerge<B, T>());
  }
}
origin: com.wizzardo.tools/tools-collections

public <V> FlowToMap<K, V, B> toMap(Mapper<? super B, V> mapper) {
  return then(new FlowToMap<K, V, B>((Map<K, V>) groups, mapper));
}
origin: wizzardo/tools

public <V> FlowToMap<K, V, B> toMap(Mapper<? super B, V> mapper) {
  return then(new FlowToMap<K, V, B>((Map<K, V>) groups, mapper));
}
origin: wizzardo/tools

public <Z, V extends Flow<Z>> Flow<Z> flatMap(Mapper<? super B, ? extends V> mapper) {
  FlowContinue<Z> continueCommand = new FlowContinue<Z>(this);
  then(new FlowFlatMap<K, V, B, Z>(mapper, continueCommand));
  return continueCommand;
}
origin: com.wizzardo.tools/tools-collections

public <Z, V extends Flow<Z>> Flow<Z> flatMap(Mapper<? super B, ? extends V> mapper) {
  FlowContinue<Z> continueCommand = new FlowContinue<Z>(this);
  then(new FlowFlatMap<K, V, B, Z>(mapper, continueCommand));
  return continueCommand;
}
com.wizzardo.tools.collections.flowFlowGroupingthen

Popular methods of FlowGrouping

  • toMap
  • onEnd
  • each
  • execute
  • filter
  • first
  • flatMap
  • limit
  • map
  • merge
  • skip
  • skip

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now