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

11
LINES

< > BotCompany Repo | #1024405 // words2_spaces_cached

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

Libraryless. Click here for Pure Java version (1679L/11K).

1  
scope words2_spaces_cached.
2  
3  
static SS #cache = synchronizedMRUCache(defaultStringTransformerCacheSize());
4  
5  
static S words2_spaces_cached(S s) {
6  
  S out = cache.get(s);
7  
  if (out == null) cache.put(s, out = words2_spaces(s));
8  
  ret out;
9  
}
10  
11  
end scope

Author comment

Began life as a copy of #1021365

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024405
Snippet name: words2_spaces_cached
Eternal ID of this version: #1024405/1
Text MD5: 98619da6440e951de3276bd8eb93bead
Transpilation MD5: fea7c9c49813f946fe35bd09a6954350
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-10 14:36:48
Source code size: 259 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 158 / 202
Referenced in: [show references]