Class ToSet
- java.lang.Object
-
- uk.gov.gchq.koryphe.function.KorypheFunction<Object,Set<?>>
-
- uk.gov.gchq.koryphe.impl.function.ToSet
-
public class ToSet extends KorypheFunction<Object,Set<?>>
AToSet
is aFunction
that takes an Object and converts it to a set. If the object is an array or iterable the items will be added to a new set. Otherwise a new set is created with the single value as an item.
-
-
Field Summary
Fields Modifier and Type Field Description static Class
DEFAULT_IMPLEMENTATION
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<?>
apply(Object value)
Class
getImplementation()
String
getImplementationAsString()
void
setImplementation(Class implementation)
void
setImplementation(String implementationString)
-
Methods inherited from class uk.gov.gchq.koryphe.function.KorypheFunction
equals, hashCode
-
-
-
-
Field Detail
-
DEFAULT_IMPLEMENTATION
public static final Class DEFAULT_IMPLEMENTATION
-
-
Constructor Detail
-
ToSet
public ToSet()
-
ToSet
public ToSet(String implementationString) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
ToSet
public ToSet(Class implementation)
-
-
Method Detail
-
getImplementation
public Class getImplementation()
-
setImplementation
public void setImplementation(Class implementation)
-
setImplementation
public void setImplementation(String implementationString) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
getImplementationAsString
public String getImplementationAsString()
-
-