1 | sclass SingleCollector<A> extends Collector<A> { |
2 | bool full; |
3 | A value; |
4 | |
5 | bool full() { ret full; } |
6 | bool add(A a) { |
7 | if (full) false; |
8 | value = a; |
9 | ret full = true; |
10 | } |
11 | bool contains(A a) { ret value == a; } |
12 | } |
Began life as a copy of #1005183
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: | #1007965 |
Snippet name: | SingleCollector |
Eternal ID of this version: | #1007965/1 |
Text MD5: | 355a2808c76bface1c7241c57ef17cfd |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-17 21:52:10 |
Source code size: | 236 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 539 / 1112 |
Referenced in: | [show references] |