wie kann ich Generische Interface Schnittstellen implementieren?
Ich habe eine Interface Klasse Calendar:
Code (Text):
// Klasse
public interface Calendar <T extends Event> {
public void addEvent(T event) throws WrongInputDateException;
public boolean removeEvent(T event);
...
public List<? extends T> getEvents(Date date);
...
public interface Calendar <T extends Event> {
public void addEvent(T event) throws WrongInputDateException;
public boolean removeEvent(T event);
...
public List<? extends T> getEvents(Date date);
...
Code (Text):
public abstract class Event {
protected Date date;
protected String title;...
protected Date date;
protected String title;...
Generische Schnittstellen
0 commentaires:
Enregistrer un commentaire