Skip to content

Instantly share code, notes, and snippets.

@stephanenicolas
Last active September 27, 2017 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephanenicolas/ac844945d500ed552ddff5b9664379d3 to your computer and use it in GitHub Desktop.
Save stephanenicolas/ac844945d500ed552ddff5b9664379d3 to your computer and use it in GitHub Desktop.
setHeadlineListener uses Generics to trigger target type inference
public class HeadLineFragment extends Fragment {
public <T> void setHeadlineListener(HeadlineListener<T> listener) {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment