1

It has been a long time since I haven't written any Java and I get pretty confused with the <String, Integer> in the following line (from the following documentation):

static class ComputeWordLengthFn extends DoFn<String, Integer> { ... }

I am not even sure that it is the generics concept that occurs here.

What should I understand regarding String and Integer here?

Documentation for DoFn: here

4
  • What is DoFn? Commented Mar 16, 2018 at 16:27
  • Give the DoFn definition if you want a explaining about that. Commented Mar 16, 2018 at 16:27
  • Assuming you're looking at this (and, btw, it helps if you say what it is you are reading), String is the input type to a function and Integer is the result type. But in general, these could mean absolutely anything. Commented Mar 16, 2018 at 16:29
  • @AndyTurner I just updated my post to provide documentation. You seem to be right indeed, input and output. How is this annotation called? This isn't generics right? Commented Mar 16, 2018 at 16:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.