1 | <A> bool addAndChange(Cl<A> cl, A a) { |
2 | if (cl == null || !cl.add(a)) false; |
3 | change(); |
4 | true; |
5 | } |
6 | |
7 | void <A> clearAndChange(Cl<A> cl) { |
8 | if (cl == null) ret; |
9 | cl.clear(); |
10 | change(); |
11 | } |
12 | |
13 | ifclass LongBuffer |
14 | void addAndChange(LongBuffer buf, long a) { |
15 | if (buf == null) ret; |
16 | buf.add(a); |
17 | change(); |
18 | } |
19 | |
20 | void clearAndChange(LongBuffer buf) { |
21 | if (buf == null) ret; |
22 | buf.clear(); |
23 | change(); |
24 | } |
25 | endif |
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, ekrmjmnbrukm, elmgxqgtpvxh, gjtlkbvenryc, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt, wnsclhtenguj
No comments. add comment
Snippet ID: | #1031423 |
Snippet name: | Concept/DynModule convenience methods [Include] |
Eternal ID of this version: | #1031423/7 |
Text MD5: | 7cda6212468112ecaa22002e9fb73f4a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-12 05:35:53 |
Source code size: | 425 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 169 / 5061 |
Version history: | 6 change(s) |
Referenced in: | [show references] |