Class ArraySetHelper
- java.lang.Object
-
- org.pepstock.charba.client.commons.ArraySetHelper
-
public final class ArraySetHelper extends Object
Utility to create array set objects from java script arrays.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayStringSet
set(ArrayString values)
Creates a array set of strings by a java script array of strings.static <E extends Key>
ArrayKeySet<E>set(ArrayString array, KeyFactory<E> factory)
Creates a array set ofKey
values by an java script array of strings.static Set<String>
unmodifiableSet(ArrayString values)
Creates a array set of strings by a java script array of strings.static <E extends Key>
Set<E>unmodifiableSet(ArrayString array, KeyFactory<E> factory)
Creates an unmodifiable array set ofKey
values by an java script array of strings.
-
-
-
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 Key> ArrayKeySet<E> set(ArrayString array, KeyFactory<E> factory)
Creates a array set ofKey
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 Key> Set<E> unmodifiableSet(ArrayString array, KeyFactory<E> factory)
Creates an unmodifiable array set ofKey
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
.
-
-