Codota Logo
Iterate.collect
Code IndexAdd Codota to your IDE (free)

How to use
collect
method
in
com.gs.collections.impl.utility.Iterate

Best Java code snippets using com.gs.collections.impl.utility.Iterate.collect (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: goldmansachs/gs-collections

@Override
public <V> MutableList<V> collect(Function<? super T, ? extends V> function)
{
  return Iterate.collect(this.delegate, function, FastList.<V>newList());
}
origin: goldmansachs/gs-collections

@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
  return Iterate.collect(this.delegate, function, UnifiedSet.<V>newSet());
}
origin: goldmansachs/gs-collections

public <V, R extends Collection<V>> R collect(Function<? super T, ? extends V> function, R target)
{
  return Iterate.collect(this.getDelegate(), function, target);
}
origin: goldmansachs/gs-collections

public <V> MutableCollection<V> collect(Function<? super T, ? extends V> function)
{
  return this.wrap(Iterate.collect(this.getDelegate(), function));
}
origin: goldmansachs/gs-collections

  public RichIterable<Pair<K, V>> keyValuesView()
  {
    synchronized (this.lock)
    {
      Set<Entry<K, V>> entries = this.getDelegate().entrySet();
      Iterable<Pair<K, V>> pairs = Iterate.collect(entries, AbstractImmutableEntry.<K, V>getPairFunction());
      return LazyIterate.adapt(pairs);
    }
  }
}
origin: com.goldmansachs/gs-collections

public <V, R extends Collection<V>> R collect(Function<? super T, ? extends V> function, R target)
{
  return Iterate.collect(this.getDelegate(), function, target);
}
origin: com.goldmansachs/gs-collections

@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
  return Iterate.collect(this.delegate, function, UnifiedSet.<V>newSet());
}
origin: com.goldmansachs/gs-collections

@Override
public <V> MutableList<V> collect(Function<? super T, ? extends V> function)
{
  return Iterate.collect(this.delegate, function, FastList.<V>newList());
}
origin: org.projectreactor/reactor-core

@Override
public void doAccept(final Event<Iterable<T>> value) {
  Iterable<T> data;
  if (null == (data = value.getData())) {
    return;
  }
  batchConsumer.accept(Iterate.collect(data, new CheckedFunction<T, Event<T>>() {
    @Override
    public Event<T> safeValueOf(T data) throws Exception {
      return value.copy(data);
    }
  }));
}
origin: com.goldmansachs/gs-collections

public <V> MutableCollection<V> collect(Function<? super T, ? extends V> function)
{
  return this.wrap(Iterate.collect(this.getDelegate(), function));
}
origin: com.goldmansachs/gs-collections

  public RichIterable<Pair<K, V>> keyValuesView()
  {
    synchronized (this.lock)
    {
      Set<Entry<K, V>> entries = this.getDelegate().entrySet();
      Iterable<Pair<K, V>> pairs = Iterate.collect(entries, AbstractImmutableEntry.<K, V>getPairFunction());
      return LazyIterate.adapt(pairs);
    }
  }
}
com.gs.collections.impl.utilityIteratecollect

Javadoc

Returns a new collection with the results of applying the specified function for each element of the iterable.

Example using a Java 8 lambda expression:

 
Collection<String> names = 
Iterate.collect(people, person -> person.getFirstName() + " " + person.getLastName()); 

Example using an anonymous inner class:

 
Collection<String> names = 
Iterate.collect(people, 
new Function<Person, String>() 
{ 
public String value(Person person) 
{ 
return person.getFirstName() + " " + person.getLastName(); 
} 
}); 

Popular methods of Iterate

  • sizeOf
    Returns the size of an iterable. In the case of Collections and RichIterables, the method size is ca
  • notEmpty
    A null-safe check on a collection to see if it is notEmpty. A null collection results in a false.
  • contains
    Returns true if the iterable contains the value. In the case of Collections and RichIterables, the m
  • count
    Returns the total number of elements that evaluate to true for the specified predicate. Example usin
  • forEach
    The procedure is evaluated for each element of the iterable. Example using a Java 8 lambda expressio
  • forEachWithIndex
    Iterates over a collection passing each element and the current relative int index to the specified
  • isEmpty
    A null-safe check on a collection to see if it isEmpty. A null collection results in a true.
  • reject
    Same as the reject method with one parameter but uses the specified target collection for the result
  • select
    Same as the select method with two parameters but uses the specified target collection Example using
  • toArray
    Copies the specified iterable into the specified array.
  • addAllIterable
    Add all elements from the source Iterable to the target collection, returns true if any element was
  • addAllTo
    Add all elements from the source Iterable to the target collection, return the target collection.
  • addAllIterable,
  • addAllTo,
  • addToMap,
  • allSatisfy,
  • allSatisfyWith,
  • anySatisfy,
  • anySatisfyWith,
  • appendString,
  • collectBoolean

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • String (java.lang)
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now