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

7
LINES

< > BotCompany Repo | #1019639 - fieldComparator

JavaX fragment (include)

static <A> Comparator<A> fieldComparator(fS field) {
  ret new Comparator<A>() {
    public int compare(A a, A b) {
      ret cmp(getOpt(a, field), getOpt(b, field));
    }
  };
}

Author comment

Began life as a copy of #1013536

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz

No comments. add comment

Snippet ID: #1019639
Snippet name: fieldComparator
Eternal ID of this version: #1019639/1
Text MD5: e473dcc5928f999ad2dad9808fc293f9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-15 03:41:20
Source code size: 185 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 121 / 133
Referenced in: [show references]

Formerly at http://tinybrain.de/1019639 & http://1019639.tinybrain.de