public interface ScheduledFuture extends Delayed, Future {} public interface Delayed extends Comparable {} Chodzi mi teraz tylko o metode CompareTo z Comparable.
Robiąc
class Foo implements ScheduledFuture Kompilator wymaga Object jako argument w compareTo.
Robiąc
class Foo implements ScheduledFuture Kompilator normalnie wymaga Delayed.
public interface ScheduledFuture extends Delayed, Future {}public interface Delayed extends Comparable {}
Chodzi mi teraz tylko o metode CompareTo z Comparable.
Robiąc
class Foo implements ScheduledFutureKompilator wymaga Object jako argument w compareTo.
Robiąc
class Foo implements ScheduledFutureKompilator normalnie wymaga Delayed.
Co jak i dlaczego?
#java #programowanie
https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html
@kernelpan1c: a nie po prostu Comparable?