1 | static <A> L<A> trimToSize(L<A> l) { |
2 | synchronized(l) { |
3 | if (l instanceof ArrayList) |
4 | ((ArrayList) l).trimToSize(); |
5 | ifclass SynchronizedArrayList |
6 | else if (l instanceof SynchronizedArrayList) |
7 | ((SynchronizedArrayList) l).trimToSize(); |
8 | endif |
9 | } |
10 | ret l; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008008 |
Snippet name: | trimToSize - trim internal representation of ArrayList to actual size |
Eternal ID of this version: | #1008008/6 |
Text MD5: | f0e1ca187d32635dc8ceca48b273e799 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-25 20:15:00 |
Source code size: | 290 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 620 / 626 |
Version history: | 5 change(s) |
Referenced in: | [show references] |