Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C#ではこれを行うことができます:
public class QuadTree<T> where T : IHasRect
Javaで同様のことを行う方法はありますか?
それがインターフェースを実装しなければならないタイプであることwhere T : IHasRectを意味する場合、Javaに相当するものはTIHasRect
where T : IHasRect
T
IHasRect
public class QuadTree<T extends HasRect>
詳細については、ジェネリックチュートリアルをお読みください。