Class SetUtils


  • public final class SetUtils
    extends java.lang.Object
    Set-related convenience methods.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SetUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String[] prefixSet​(java.util.Set<java.lang.String> set, java.lang.String prefix)
      Extracts the Strings from a Set that start with a given prefix.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SetUtils

        private SetUtils()
    • Method Detail

      • prefixSet

        public static java.lang.String[] prefixSet​(java.util.Set<java.lang.String> set,
                                                   java.lang.String prefix)
        Extracts the Strings from a Set that start with a given prefix.
        Parameters:
        set - a Set of Strings (assumed to all be non-null)
        prefix - the prefix to look for in the string set
        Returns:
        an array of the matching strings from the given set