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

23
LINES

< > BotCompany Repo | #1015843 // Test serializing synchronizedTreeMap (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (7544L/52K).

1  
!7
2  
3  
p-experiment {
4  
  Map map = synchronizedTreeMap();
5  
  S name = className(map);
6  
  print(name);
7  
  S s;
8  
  print(s = struct(map));
9  
  Map map2 = cast unstruct(s);
10  
  assertEquals(name, className(map2));
11  
  assertEquals(map, map2);
12  
  
13  
  map.put("c", "d");
14  
  map.put("a", "b");
15  
  map.put("d", "e");
16  
  map.put("e", "f");
17  
  print(s = struct(map));
18  
  map2 = (Map) unstruct(s);
19  
  assertEquals(name, className(map2));
20  
  assertEquals(map, map2);
21  
  
22  
  print("OK");
23  
}

Author comment

Began life as a copy of #1015840

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: #1015843
Snippet name: Test serializing synchronizedTreeMap (OK)
Eternal ID of this version: #1015843/2
Text MD5: a677a132284eebe877ca48fb57341a19
Transpilation MD5: 7db7fbd2148d033ade19a7d58ebddea6
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-28 18:13:14
Source code size: 474 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 284 / 719
Version history: 1 change(s)
Referenced in: [show references]