Class ArraySetHelper


  • public final class ArraySetHelper
    extends Object
    Utility to create array set objects from java script arrays.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • set

        public static ArrayStringSet set​(ArrayString values)
        Creates a array set of strings by a java script array of strings.
        Parameters:
        values - array of elements to load when the set is creating.
        Returns:
        a array set of strings instance
      • set

        public static <E extends KeyArrayKeySet<E> set​(ArrayString array,
                                                         KeyFactory<E> factory)
        Creates a array set of Key values by an java script array of strings.
        Type Parameters:
        E - type of key
        Parameters:
        array - array of strings to load when the set is creating.
        factory - factory implementation to create keys by a single native object of the array.
        Returns:
        a array set of Key.
      • unmodifiableSet

        public static Set<String> unmodifiableSet​(ArrayString values)
        Creates a array set of strings by a java script array of strings.
        Parameters:
        values - array of elements to load when the set is creating.
        Returns:
        a array set of strings instance
      • unmodifiableSet

        public static <E extends KeySet<E> unmodifiableSet​(ArrayString array,
                                                             KeyFactory<E> factory)
        Creates an unmodifiable array set of Key values by an java script array of strings.
        Type Parameters:
        E - type of key
        Parameters:
        array - array of strings to load when the set is creating.
        factory - factory implementation to create keys by a single native object of the array.
        Returns:
        a array set of Key.