StringDeduplicateConcat

See javadoc - uk.gov.gchq.koryphe.impl.binaryoperator.StringDeduplicateConcat

Available since Koryphe version 1.0.0

Concatenates 2 strings and omits duplicates

Examples

String deduplicate concat with separator

Java
JSON
Full JSON
final StringDeduplicateConcat stringDeduplicateConcat = new StringDeduplicateConcat();
stringDeduplicateConcat.setSeparator(" ");
{
  "class" : "StringDeduplicateConcat",
  "separator" : " "
}
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.StringDeduplicateConcat",
  "separator" : " "
}

Input type:

java.lang.String

Example inputs:

Input TypeInputsResult TypeResult
java.lang.Stringhello and worldjava.lang.Stringhello world
java.lang.Stringabc and nulljava.lang.Stringabc
null and nullnull
java.lang.Stringabc, and abcjava.lang.Stringabc, abc

String deduplicate concat with default separator

Java
JSON
Full JSON
final StringDeduplicateConcat stringDeduplicateConcat = new StringDeduplicateConcat();
{
  "class" : "StringDeduplicateConcat",
  "separator" : ","
}
{
  "class" : "uk.gov.gchq.koryphe.impl.binaryoperator.StringDeduplicateConcat",
  "separator" : ","
}

Input type:

java.lang.String

Example inputs:

Input TypeInputsResult TypeResult
java.lang.Stringhello and worldjava.lang.Stringhello,world
java.lang.Stringabc and nulljava.lang.Stringabc
null and nullnull
java.lang.Stringabc, and abcjava.lang.Stringabc

results matching ""

    No results matching ""