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

9
LINES

< > BotCompany Repo | #1004603 // bitSet - test a bit in int / convert L<Int> to BitSet

JavaX fragment (include)

static bool bitSet(int x, int bit) {
  ret (x & (1 << bit)) != 0;
}

static BitSet bitSet(L<Int> l) {
  new BitSet b;
  for (int i : l) b.set(i);
  ret b;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004603
Snippet name: bitSet - test a bit in int / convert L<Int> to BitSet
Eternal ID of this version: #1004603/1
Text MD5: 07a4ce9a6a51492c6df492d0f5da190d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-03 20:38:46
Source code size: 164 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 484 / 475
Referenced in: [show references]