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

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

Best Java code snippets using com.gs.collections.impl.utility.Iterate.select (Showing top 10 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

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

@Override
public MutableSet<T> select(Predicate<? super T> predicate)
{
  return Iterate.select(this.delegate, predicate, UnifiedSet.<T>newSet());
}
origin: goldmansachs/gs-collections

@Override
public MutableSortedSet<T> select(Predicate<? super T> predicate)
{
  return Iterate.select(this.delegate, predicate, TreeSortedSet.newSet(this.comparator()));
}
origin: goldmansachs/gs-collections

public MutableCollection<T> select(Predicate<? super T> predicate)
{
  return this.wrap(Iterate.select(this.getDelegate(), predicate));
}
origin: goldmansachs/gs-collections

public static <T> void assertNoneSatisfy(String message, Iterable<T> iterable, Predicate<? super T> predicate)
{
  try
  {
    MutableList<T> unnacceptable = Iterate.select(iterable, predicate, Lists.mutable.<T>empty());
    if (unnacceptable.notEmpty())
    {
      Assert.fail(message + " <" + unnacceptable + '>');
    }
  }
  catch (AssertionError e)
  {
    Verify.throwMangledException(e);
  }
}
origin: com.goldmansachs/gs-collections

@Override
public MutableSet<T> select(Predicate<? super T> predicate)
{
  return Iterate.select(this.delegate, predicate, UnifiedSet.<T>newSet());
}
origin: com.goldmansachs/gs-collections

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

public MutableCollection<T> select(Predicate<? super T> predicate)
{
  return this.wrap(Iterate.select(this.getDelegate(), predicate));
}
origin: com.goldmansachs/gs-collections

@Override
public MutableSortedSet<T> select(Predicate<? super T> predicate)
{
  return Iterate.select(this.delegate, predicate, TreeSortedSet.newSet(this.comparator()));
}
origin: com.goldmansachs/gs-collections-testutils

public static <T> void assertNoneSatisfy(String message, Iterable<T> iterable, Predicate<? super T> predicate)
{
  try
  {
    MutableList<T> unnacceptable = Iterate.select(iterable, predicate, Lists.mutable.<T>empty());
    if (unnacceptable.notEmpty())
    {
      Assert.fail(message + " <" + unnacceptable + '>');
    }
  }
  catch (AssertionError e)
  {
    Verify.throwMangledException(e);
  }
}
com.gs.collections.impl.utilityIterateselect

Javadoc

Returns a new collection with only the elements that evaluated to true for the specified predicate.

Example using a Java 8 lambda expression:

 
Collection<Person> selected = 
Iterate.select(people, person -> person.getAddress().getCity().equals("Metuchen")); 

Example using an anonymous inner class:

e.g. 
Collection<Person> selected = 
Iterate.select(people, new Predicate<Person>() 
{ 
public boolean value(Person person) 
{ 
return person.getAddress().getCity().equals("Metuchen"); 
} 
}); 

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.
  • collect
    Same as the #collect(Iterable,Function) method with two parameters, except that the results are gath
  • 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
  • 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

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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