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

26
LINES

< > BotCompany Repo | #1030483 // inc - synonym of incAtomicLong + more

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4562L) is out of date.

1  
static int inc(AtomicInteger i) {
2  
  ret incAtomicInt(i);
3  
}
4  
5  
static int inc(AtomicInteger i, int delta) {
6  
  ret incAtomicInt(i, delta);
7  
}
8  
9  
static long inc(AtomicLong l) {
10  
  ret incAtomicLong(l);
11  
}
12  
13  
static long inc(AtomicLong l, long b) {
14  
  ret l.addAndGet(b);
15  
}
16  
17  
static int inc(IntVar v) {
18  
  synchronized(v) {
19  
    int val = v! + 1;
20  
    v.set(val);
21  
    ret val;
22  
  }
23  
}
24  
25  
static int inc(int i) { ret i+1; }
26  
static long inc(long l) { ret l+1; }

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030483
Snippet name: inc - synonym of incAtomicLong + more
Eternal ID of this version: #1030483/8
Text MD5: c666ffffd86de76aca8fa33b661bbdc3
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-13 03:03:56
Source code size: 463 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 326 / 419
Version history: 7 change(s)
Referenced in: [show references]