Codota Logo
CollectionUtils.nullSafeIterable
Code IndexAdd Codota to your IDE (free)

How to use
nullSafeIterable
method
in
org.springframework.data.gemfire.util.CollectionUtils

Best Java code snippets using org.springframework.data.gemfire.util.CollectionUtils.nullSafeIterable (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.springframework.data/spring-data-geode

  default void createDiskStores(Iterable<SchemaObjectDefinition> diskStoreDefinitions) {
    nullSafeIterable(diskStoreDefinitions).forEach(this::createDiskStore);
  }
}
origin: org.springframework.data/spring-data-geode

  public GemFireComponentClassTypeScanner withIncludes(Iterable<TypeFilter> includes) {
    stream(nullSafeIterable(includes).spliterator(), false).forEach(this.includes::add);
    return this;
  }
}
origin: org.springframework.data/spring-data-gemfire

public GemFireComponentClassTypeScanner withExcludes(Iterable<TypeFilter> excludes) {
  stream(nullSafeIterable(excludes).spliterator(), false).forEach(this.excludes::add);
  return this;
}
origin: org.springframework.data/spring-data-gemfire

  public GemFireComponentClassTypeScanner withIncludes(Iterable<TypeFilter> includes) {
    stream(nullSafeIterable(includes).spliterator(), false).forEach(this.includes::add);
    return this;
  }
}
origin: org.springframework.data/spring-data-geode-test

public static FileFilter and(Iterable<FileFilter> fileFilters) {
  FileFilter current = null;
  for (FileFilter fileFilter : nullSafeIterable(fileFilters)) {
    current = compose(current, LogicalOperator.AND, fileFilter);
  }
  return current;
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link DiskStoreConfigurer DiskStoreConfigurers}
 * to this {@link DiskStoreFactoryBean}.
 *
 * @param diskStoreName {@link String} containing the name of the {@link DiskStore}.
 * @param diskStoreConfigurers {@link Iterable} of {@link DiskStoreConfigurer DiskStoreConfigurers} applied
 * to this {@link DiskStoreFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.DiskStoreConfigurer
 */
protected void applyDiskStoreConfigurers(String diskStoreName, Iterable<DiskStoreConfigurer> diskStoreConfigurers) {
  stream(nullSafeIterable(diskStoreConfigurers).spliterator(), false)
    .forEach(diskStoreConfigurer -> diskStoreConfigurer.configure(diskStoreName, this));
}
origin: org.springframework.data/spring-data-gemfire

@Nullable
public static SchemaObjectDefiner compose(Iterable<SchemaObjectDefiner> schemaObjectDefiners) {
  Set<SchemaObjectDefiner> schemaObjectDefinerSet =
    stream(nullSafeIterable(schemaObjectDefiners).spliterator(), false)
      .filter(Objects::nonNull).collect(Collectors.toSet());
  return (schemaObjectDefinerSet.isEmpty() ? null
    : (schemaObjectDefinerSet.size() == 1 ? schemaObjectDefinerSet.iterator().next()
    : new ComposableSchemaObjectDefiner(schemaObjectDefinerSet)));
}
origin: org.springframework.data/spring-data-gemfire

@Nullable
public static SchemaObjectCollector<?> compose(Iterable<SchemaObjectCollector<?>> schemaObjectCollectors) {
  List<SchemaObjectCollector<?>> schemaObjectCollectorList =
    stream(nullSafeIterable(schemaObjectCollectors).spliterator(), false)
      .filter(Objects::nonNull).collect(Collectors.toList());
  return (schemaObjectCollectorList.isEmpty() ? null
    : (schemaObjectCollectorList.size() == 1 ? schemaObjectCollectorList.iterator().next()
      : new ComposableSchemaObjectCollector(schemaObjectCollectorList)));
}
origin: org.springframework.data/spring-data-geode

@Nullable
public static SchemaObjectCollector<?> compose(Iterable<SchemaObjectCollector<?>> schemaObjectCollectors) {
  List<SchemaObjectCollector<?>> schemaObjectCollectorList =
    stream(nullSafeIterable(schemaObjectCollectors).spliterator(), false)
      .filter(Objects::nonNull).collect(Collectors.toList());
  return (schemaObjectCollectorList.isEmpty() ? null
    : (schemaObjectCollectorList.size() == 1 ? schemaObjectCollectorList.iterator().next()
      : new ComposableSchemaObjectCollector(schemaObjectCollectorList)));
}
origin: org.springframework.data/spring-data-geode-test

public static FileFilter or(Iterable<FileFilter> fileFilters) {
  FileFilter current = null;
  for (FileFilter fileFilter : nullSafeIterable(fileFilters)) {
    current = compose(current, LogicalOperator.OR, fileFilter);
  }
  return current;
}
origin: org.springframework.session/spring-session-data-geode

public static PdxSerializer compose(Iterable<PdxSerializer> pdxSerializers) {
  List<PdxSerializer> pdxSerializerList =
    stream(nullSafeIterable(pdxSerializers).spliterator(), false)
      .filter(Objects::nonNull).collect(Collectors.toList());
  return (pdxSerializerList.isEmpty() ? null
    : (pdxSerializerList.size() == 1 ? pdxSerializerList.get(0)
    : new ComposablePdxSerializer(pdxSerializerList)));
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Applies the given {@link Iterable} of {@link IndexConfigurer IndexConfigurers}
 * to this {@link LuceneIndexFactoryBean}.
 *
 * @param indexName {@link String} containing the name of the {@link LuceneIndex}.
 * @param indexConfigurers {@link Iterable} of {@link IndexConfigurer IndexConfigurers} applied
 * to this {@link LuceneIndexFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.IndexConfigurer
 */
protected void applyIndexConfigurers(String indexName, Iterable<IndexConfigurer> indexConfigurers) {
  stream(nullSafeIterable(indexConfigurers).spliterator(), false)
    .forEach(indexConfigurer -> indexConfigurer.configure(indexName, this));
}
origin: org.springframework.data/spring-data-geode

@Nullable
public static SchemaObjectDefiner compose(Iterable<SchemaObjectDefiner> schemaObjectDefiners) {
  Set<SchemaObjectDefiner> schemaObjectDefinerSet =
    stream(nullSafeIterable(schemaObjectDefiners).spliterator(), false)
      .filter(Objects::nonNull).collect(Collectors.toSet());
  return (schemaObjectDefinerSet.isEmpty() ? null
    : (schemaObjectDefinerSet.size() == 1 ? schemaObjectDefinerSet.iterator().next()
    : new ComposableSchemaObjectDefiner(schemaObjectDefinerSet)));
}
origin: org.springframework.data/spring-data-geode

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link IndexConfigurer IndexConfigurers}
 * to this {@link IndexFactoryBean}.
 *
 * @param indexName {@link String} containing the name of the {@link Index}.
 * @param indexConfigurers {@link Iterable} of {@link IndexConfigurer IndexConfigurers} applied
 * to this {@link IndexFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer
 */
protected void applyIndexConfigurers(String indexName, Iterable<IndexConfigurer> indexConfigurers) {
  stream(nullSafeIterable(indexConfigurers).spliterator(), false)
    .forEach(indexConfigurer -> indexConfigurer.configure(indexName, this));
}
origin: org.springframework.data/spring-data-geode

/**
 * Applies the {@link Iterable} of {@link ContinuousQueryListenerContainerConfigurer} objects to customize
 * the configuration of this {@link ContinuousQueryListenerContainer}.
 *
 * @param configurers {@link Iterable} of {@link ContinuousQueryListenerContainerConfigurer} used to customize
 * the configuration of this {@link ContinuousQueryListenerContainer}.
 * @see org.springframework.data.gemfire.config.annotation.ContinuousQueryListenerContainerConfigurer
 */
protected void applyContinuousQueryListenerContainerConfigurers(
    Iterable<ContinuousQueryListenerContainerConfigurer> configurers) {
  stream(nullSafeIterable(configurers).spliterator(), false)
    .forEach(configurer -> configurer.configure(getBeanName(), this));
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link PoolConfigurer PoolConfigurers}
 * to this {@link PoolFactoryBean}.
 *
 * @param poolConfigurers {@link Iterable} of {@link PoolConfigurer PoolConfigurers}
 * applied to this {@link PoolFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.PoolConfigurer
 */
protected void applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers) {
  stream(nullSafeIterable(poolConfigurers).spliterator(), false)
    .forEach(poolConfigurer -> poolConfigurer.configure(getName(), this));
}
origin: org.springframework.data/spring-data-geode

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers}
 * to this {@link CacheServerFactoryBean}.
 *
 * @param cacheServerConfigurers {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} applied to
 * this {@link CacheServerFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.CacheServerConfigurer
 */
protected void applyCacheServerConfigurers(Iterable<CacheServerConfigurer> cacheServerConfigurers) {
  stream(nullSafeIterable(cacheServerConfigurers).spliterator(), false)
    .forEach(cacheServerConfigurer -> cacheServerConfigurer.configure(getBeanName(), this));
}
origin: org.springframework.data/spring-data-geode

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link PoolConfigurer PoolConfigurers}
 * to this {@link PoolFactoryBean}.
 *
 * @param poolConfigurers {@link Iterable} of {@link PoolConfigurer PoolConfigurers}
 * applied to this {@link PoolFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.PoolConfigurer
 */
protected void applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers) {
  stream(nullSafeIterable(poolConfigurers).spliterator(), false)
    .forEach(poolConfigurer -> poolConfigurer.configure(getName(), this));
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link ClientCacheConfigurer ClientCacheConfigurers}
 * to this {@link ClientCacheFactoryBean}.
 *
 * @param clientCacheConfigurers {@link Iterable} of {@link ClientCacheConfigurer ClientCacheConfigurers}
 * applied to this {@link ClientCacheFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer
 * @see java.lang.Iterable
 */
protected void applyClientCacheConfigurers(Iterable<ClientCacheConfigurer> clientCacheConfigurers) {
  stream(nullSafeIterable(clientCacheConfigurers).spliterator(), false)
    .forEach(clientCacheConfigurer -> clientCacheConfigurer.configure(getBeanName(), this));
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Null-safe operation to apply the given {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers}
 * to this {@link CacheServerFactoryBean}.
 *
 * @param cacheServerConfigurers {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} applied to
 * this {@link CacheServerFactoryBean}.
 * @see org.springframework.data.gemfire.config.annotation.CacheServerConfigurer
 */
protected void applyCacheServerConfigurers(Iterable<CacheServerConfigurer> cacheServerConfigurers) {
  stream(nullSafeIterable(cacheServerConfigurers).spliterator(), false)
    .forEach(cacheServerConfigurer -> cacheServerConfigurer.configure(getBeanName(), this));
}
org.springframework.data.gemfire.utilCollectionUtilsnullSafeIterable

Javadoc

A null-safe operation returning the original Iterable object if non-null or a default, empty Iterable implementation if null.

Popular methods of CollectionUtils

  • asSet
    Returns an unmodifiable Set containing the elements from the given object array.
  • nullSafeMap
    Null-safe operation returning the given Map if not nullor an empty Map if null.
  • nullSafeSet
    Null-safe operation returning the given Set if not nullor an empty Set if null.
  • iterable
    Adapts the given Iterator as an Iterable object for use within a for each loop.
  • nullSafeList
    Null-safe operation returning the given List if not nullor an empty List if null.
  • addAll
    Adds all elements from the given Iterable to the Collection.
  • containsAny
    Null-safe method to determines whether the given Collection contains any elements from the given arr
  • emptyIterable
    Returns an empty Iterable object.
  • isEmpty
  • newSortedMap
  • nullSafeCollection
    Null-safe operation returning the given Collection if not nullor an empty Collection (implemented wi
  • nullSafeEnumeration
    Null-safe operation returning the given Enumeration if not nullor an Collections#emptyEnumeration()
  • nullSafeCollection,
  • nullSafeEnumeration,
  • nullSafeIsEmpty,
  • nullSafeIterator,
  • nullSafeSize,
  • toIterator,
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JFileChooser (javax.swing)
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