An example in the doc of flink show how create a custom MapFunction class
https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/user_defined_functions/#implementing-an-interface