Похожие чаты

Hi guys, i need some help. I have to add

some objects to a treeSet. This set has an overriden compareTo method, that is not working got me, that i can t edit. Some helps?

3 ответов

7 просмотров

It would be helpful with a lil piece of code that we can see

You mean you have the TreeSet<T> and that T has "compareTo" implemented that you can't edit, right?

If my previous assumption is correct then this is easily solved via wrapper/decorator if all information for implementing "compareTo" is accessible via public methods of T. Otherwise if that info is accessible via public+protected methods then you end up with extending T.

Похожие вопросы

Обсуждают сегодня

Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
48
Ясн. Но я всеравно к кедам отношусь с опасением. Чисто субьективное кедосозерцание. Что касаемо "восторга изяшности кед" так и не вкурил, хотя много слышал, пока не поставил с...
Артем Записной
30
А чем вам питонисты не угодили?😂
.
79
type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Hey guys, did you see the new announcement about $Fun? 🔥
Filip Murphy
55
Такой вопросец - есть функция function MySuperDuperConcat(const a: array of AnsiString): AnsiString; Как мне в её теле сделать вот так? Result:=Concat(a); А не грустный вариан...
notme
15
[c8] what's the best looking best ux mobile wallet in crypto?
DiscordBridge
12
They keep hyping $FUN but where's the progress? 🙄
Noah Noure
23
Btw guys very stupid question but i haven't researchd so js asking you pros . Can ltc be traced too? Literally point to pint to the user? And getting the banks blocked ? Exch...
20
Can I deposit from Bingx-exchange to wazirx? Any problem? Admin
Crypto Alt Trader
16
Карта сайта