Skip to content

Instantly share code, notes, and snippets.

@stephanenicolas
Last active September 27, 2017 00:02
Show Gist options
  • 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