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

3
LINES

< > BotCompany Repo | #1028712 // rangePlus - extend range to contain element

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

Libraryless. Click here for Pure Java version (2531L/16K).

static IntRange rangePlus(IntRange r, int i) {
  ret r == null ? IntRange(i, i+1) : IntRange(min(r.start, i), max(r.end, i+1));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028712
Snippet name: rangePlus - extend range to contain element
Eternal ID of this version: #1028712/1
Text MD5: 089e13382609d730bd52b768019b3de2
Transpilation MD5: cdf49bcef0e5be5efadafaa06ca6ff6e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-06 00:04:54
Source code size: 131 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 215 / 329
Referenced in: [show references]