ToSet
See javadoc - uk.gov.gchq.koryphe.impl.function.ToSet
Available since Koryphe version 1.6.0
Converts an Object to a Set
Examples
To list
Java
JSON
Full JSON
Python
final ToSet function = new ToSet();{
"class" : "uk.gov.gchq.koryphe.impl.function.ToSet"
}{
"class" : "uk.gov.gchq.koryphe.impl.function.ToSet"
}g.ToSet()Input type:
java.lang.Object
Example inputs:
| Input Type | Input | Result Type | Result |
|---|---|---|---|
| java.lang.String | test | java.util.HashSet | [test] |
| null | java.util.HashSet | [null] | |
| java.lang.Long | 30 | java.util.HashSet | [30] |
| uk.gov.gchq.gaffer.types.TypeSubTypeValue | TypeSubTypeValue[type=t,subType=st,value=v] | java.util.HashSet | [TypeSubTypeValue[type=t,subType=st,value=v]] |
| [Ljava.lang.String; | [a, b, c] | java.util.HashSet | [a, b, c] |
| java.util.Arrays$ArrayList | [test1, test2] | java.util.HashSet | [test2, test1] |