Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1008008 // trimToSize - trim internal representation of ArrayList to actual size

JavaX fragment (include)

static <A> L<A> trimToSize(L<A> l) {
  synchronized(l) {
    if (l instanceof ArrayList)
      ((ArrayList) l).trimToSize();
    ifclass SynchronizedArrayList
    else if (l instanceof SynchronizedArrayList)
      ((SynchronizedArrayList) l).trimToSize();
    endif
  }
  ret l;
}

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: 621 / 627
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)