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

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

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

/**
 * Adapts the given Enumeration as an Iterable object for use within a for each loop.
 *
 * @param <T> the class type of the Enumeration elements.
 * @param enumeration the Enumeration to adapt as an Iterable object.
 * @return an Iterable instance of the Enumeration.
 * @see java.lang.Iterable
 * @see java.util.Enumeration
 */
@NonNull
public static <T> Iterable<T> iterable(@Nullable Enumeration<T> enumeration) {
  return () -> toIterator(nullSafeEnumeration(enumeration));
}
origin: org.springframework.data/spring-data-geode

/**
 * Adapts the given Enumeration as an Iterable object for use within a for each loop.
 *
 * @param <T> the class type of the Enumeration elements.
 * @param enumeration the Enumeration to adapt as an Iterable object.
 * @return an Iterable instance of the Enumeration.
 * @see java.lang.Iterable
 * @see java.util.Enumeration
 */
@NonNull
public static <T> Iterable<T> iterable(@Nullable Enumeration<T> enumeration) {
  return () -> toIterator(nullSafeEnumeration(enumeration));
}
org.springframework.data.gemfire.utilCollectionUtilsnullSafeEnumeration

Javadoc

Null-safe operation returning the given Enumeration if not nullor an Collections#emptyEnumeration() if null.

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,
  • nullSafeIsEmpty,
  • 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