Java UDF functions for pig scripting

Turns a bag into a tuple