Bound Mismatch Error: The type is not a valid substitute

Viewed 13572

Bound Mismatch Error: The Type is not a valid substitute

Task: I want to store "Song class object" in ImmutableSet through PlayList class.

I have three classes.

public class ImmutableBinaryTree< T extends Comparable<T>> implements ImmutableSet<T> { }

public class Song { }


public class PlayList<T extends Comparable<T>> {
     private Song songs;  
     ImmutableSet<Song> immutableSet; // Bound Mismatch error occurring here
1 Answers
Related