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

4
LINES

< > BotCompany Repo | #1009367 // trimListToSizeInFront - drop elements from beginning of list until it has a certain size

JavaX fragment (include)

static void trimListToSizeInFront(L l, int targetSize) {
  int excess = l(l) - targetSize;
  if (excess > 0) removeSubList(l, 0, excess);
}

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: #1009367
Snippet name: trimListToSizeInFront - drop elements from beginning of list until it has a certain size
Eternal ID of this version: #1009367/2
Text MD5: ddd072ee9e98802afd7d9911d4564462
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-25 17:57:07
Source code size: 142 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 374 / 405
Version history: 1 change(s)
Referenced in: [show references]