Skip to content

Instantly share code, notes, and snippets.

@jpetitto
Created September 28, 2015 17:25
Show Gist options
  • Save jpetitto/215e7afca35db9b5f2ed to your computer and use it in GitHub Desktop.
Save jpetitto/215e7afca35db9b5f2ed to your computer and use it in GitHub Desktop.
"We simply cannot afford another wildcards" - Joshua Bloch
Enum<E extends Enum<E>> { ... }
<T extends Object & Comparable<? super T>> T Collections.max(Collection<? extends T>) { ... }
public <V extends Wrapper<? extends Comparable<T>>>
Comparator<V> comparator() { ... }
error: equalTo(Box<capture of ?>) in Box<capture of ?> cannot be applied to (Box<capture of ?>)
equal = unknownBox.equalTo(unknownBox)
Arrays.asList(String.class, Integer.class) // Warning!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment