java - generic interface: list of something specific -
I want to define the interface MyList, which is a list of interfaces, part of the terminology of MyThing Mylist is that its functions There is no point in the objects that do not apply to the matting interface.
Is this the right declaration?
Interface MyList & lt; E-Mating Expands & gt; List & lt; E & gt; {...} Edit: (Part 2) Now I have another interface that gives MyList as its methods.
// I am defining this interface // It seems that it requires a wildcard or template parameter interface MyPlace {MyList getThings (); } // This sample class is a sample implementation specific location & lt; E-Mating Spreads & gt; MyPlace {MyList & lt; E & gt; Applies; GetThings (); } // Perhaps someone else wants to do / / This is a class that is specific for myteniting / which is a sub class of / / Mathing Class Super Night Place & lt; E MyNeatThing & gt; MyPlace {MyList & lt; E & gt; Applies; GetThings (); // problem? // it meets e (sign) separately, is not it? }
Yes, at least this is how.
Public abstract class EnumSet & lt; E extends Enum & lt; E & gt; & Gt;
abstractSet & lt; E & gt;
In response to edit part 2:
I'm not sure that the return type in the interface Why do not complain about raw type, I suspect that due to forgetfulness of type, warnings can be useless in the interface, even if they are present there (if you return to the type of return Change to list , then there is no warning.)
The second question, since Maine It is within the limits of the current extension extension MyThing , it is a type of binding extended in normal criteria, is not it ?
Comments
Post a Comment