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

14
LINES

< > BotCompany Repo | #1036573 // steppableOnce

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

Libraryless. Click here for Pure Java version (10059L/55K).

1  
srecord noeq SteppableOnce(Runnable action) is Steppable {
2  
  public bool step() {
3  
    Runnable r = action;
4  
    if (r != null) {
5  
      action = null;
6  
      r.run();
7  
    }
8  
    false;
9  
  }
10  
}
11  
12  
static Steppable steppableOnce(Runnable action) {
13  
  ret new SteppableOnce(action);
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036573
Snippet name: steppableOnce
Eternal ID of this version: #1036573/4
Text MD5: 1210fc9e2fee2465ae2b42201259f393
Transpilation MD5: e5f318706872412d53262575fc128552
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-14 19:00:35
Source code size: 285 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 66 / 103
Version history: 3 change(s)
Referenced in: [show references]