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

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

Best Java code snippets using org.springframework.data.gemfire.util.CollectionUtils.nullSafeIsEmpty (Showing top 2 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

/**
 * Binds the given {@link Collection} of values into the {@literal IN} parameters of the OQL Query by expanding
 * the given values into a comma-separated {@link String}.
 *
 * @param values the values to bind, returns the {@link QueryString} as is if {@literal null} is given.
 * @return a Query String having "in" parameters bound with values.
 */
public QueryString bindIn(Collection<?> values) {
  if (!nullSafeIsEmpty(values)) {
    return QueryString.of(this.query.replaceFirst(IN_PATTERN, String.format("(%s)",
      StringUtils.collectionToDelimitedString(values, ", ", "'", "'"))));
  }
  return this;
}
origin: org.springframework.data/spring-data-gemfire

/**
 * Binds the given {@link Collection} of values into the {@literal IN} parameters of the OQL Query by expanding
 * the given values into a comma-separated {@link String}.
 *
 * @param values the values to bind, returns the {@link QueryString} as is if {@literal null} is given.
 * @return a Query String having "in" parameters bound with values.
 */
public QueryString bindIn(Collection<?> values) {
  if (!nullSafeIsEmpty(values)) {
    return QueryString.of(this.query.replaceFirst(IN_PATTERN, String.format("(%s)",
      StringUtils.collectionToDelimitedString(values, ", ", "'", "'"))));
  }
  return this;
}
org.springframework.data.gemfire.utilCollectionUtilsnullSafeIsEmpty

Javadoc

Determines whether the given Collection is Collection#isEmpty().

Popular methods of CollectionUtils

  • asSet
    Returns an unmodifiable Set containing the elements from the given object array.
  • nullSafeIterable
    Returns the given Iterable if not null or empty, otherwise returns the defaultIterable.
  • 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
  • newSortedMap,
  • nullSafeCollection,
  • nullSafeEnumeration,
  • nullSafeIterator,
  • nullSafeSize,
  • toIterator,
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JCheckBox (javax.swing)
  • 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