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

5
LINES

< > BotCompany Repo | #1033270 // floorValue - value of floorEntry

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

Libraryless. Click here for Pure Java version (30L/1K).

1  
static <A, B> B floorValue(NavigableMap<A, B> map, A key) {
2  
  if (map == null) null;
3  
  var e = map.floorEntry(key);
4  
  ret e == null ?: e.getValue();
5  
}

Author comment

Began life as a copy of #1008021

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033270
Snippet name: floorValue - value of floorEntry
Eternal ID of this version: #1033270/2
Text MD5: 3f8853aa86ba1db6029e477d7065a51b
Transpilation MD5: 80152c34dd97125ae16752200ba881db
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-18 03:53:10
Source code size: 154 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 147 / 207
Version history: 1 change(s)
Referenced in: [show references]