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

11
LINES

< > BotCompany Repo | #1019786 // fillArrayUnlessZero

JavaX fragment (include)

1  
static void fillArrayUnlessZero(byte[] a, byte value) {
2  
  if (value != 0) Arrays.fill(a, value);
3  
}
4  
5  
static void fillArrayUnlessZero(int[] a, int value) {
6  
  if (value != 0) Arrays.fill(a, value);
7  
}
8  
9  
static void fillArrayUnlessZero(float[] a, float value) {
10  
  if (value != 0) Arrays.fill(a, value);
11  
}

Author comment

Began life as a copy of #1010765

download  show line numbers  debug dex  old transpilations   

Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, ofpaelxlmzfo, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019786
Snippet name: fillArrayUnlessZero
Eternal ID of this version: #1019786/1
Text MD5: 6434a8f0e64afa498df37053f0c1dc69
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-26 19:13:57
Source code size: 308 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 390
Referenced in: [show references]