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

13
LINES

< > BotCompany Repo | #1005335 // assertLength - assert length of list or string

JavaX fragment (include)

1  
static <A> L<A> assertLength(int length, L<A> l) {
2  
  assertEquals(length, l(l));
3  
  ret l;
4  
}
5  
6  
static S assertLength(int length, S s) {
7  
  assertEquals(s, length, l(s));
8  
  ret s;
9  
}
10  
11  
static S assertLength(S s, int length) {
12  
  ret assertLength(length, s);
13  
}

Author comment

Began life as a copy of #1004689

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: #1005335
Snippet name: assertLength - assert length of list or string
Eternal ID of this version: #1005335/6
Text MD5: f7c1769b71a45e76a993a7a6a603c761
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-11 02:07:19
Source code size: 264 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 512 / 551
Version history: 5 change(s)
Referenced in: [show references]