Class SetUtils


  • public final class SetUtils
    extends Object
    Set-related convenience methods.
    • Method Detail

      • prefixSet

        public static String[] prefixSet​(Set<String> set,
                                         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