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

7
LINES

< > BotCompany Repo | #1006222 - makeReversedComparator - convert two-argument func to reversed Comparator

JavaX fragment (include)

static Comparator makeReversedComparator(fO f) {
  ret new Comparator {
    public int compare(O a, O b) {
      ret (int) callF(f, b, a);
    }
  };
}

Author comment

Began life as a copy of #1006220

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006222
Snippet name: makeReversedComparator - convert two-argument func to reversed Comparator
Eternal ID of this version: #1006222/1
Text MD5: bdbaaedf742f9ba6ac66cfead72ccf5b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-23 16:30:44
Source code size: 159 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 387 / 393
Referenced in: [show references]