@ SafeVarargs private static < T > Object toObject ( T value , Function < T , Object > ... converters ) { return Stream . of ( converters ) . map ( converter -> converter . apply ( value ) ) . filter ( Objects :: nonNull ) . findFirst ( ) . orElse ( null ) ; }
Returns the first non - null object produced by the given converters . Returns null if no such object found .