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.
こんにちは、イテレータを使用してジェネリック TreeSet を作成する際に問題があります。3種類のTypeに使いたいです。
誰かがそれを行う方法を手伝ってもらえますか?
タイプのTreeSetオブジェクトを含むを作成したい場合、使用する必要がありますClassAClassBClassC
TreeSet
ClassA
ClassB
ClassC
TreeSet<MostSpecificSupertypeOfABC>
使用する適切なタイプがない場合は、以下の質問への回答で説明したように作成できます。