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

11
LINES

< > BotCompany Repo | #1021914 // scoredSearchInAllStringFields_impl

JavaX fragment (include)

1  
svoid scoredSearchInAllStringFields_impl(LS prepared, Map<O, Int> scores, L objects) ctex {
2  
  if (objects != null) for (O o : objects)
3  
    if (o != null) {
4  
      int score = 0;
5  
      for (Field f : values(instanceFieldsMap(o)))
6  
        if (f.getType().equals(S) && !isStaticField(f))
7  
          score += scoredSearch_score((S) f.get(o), prepared);
8  
      if (score != 0)
9  
        scores.put(o, score);
10  
    }
11  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021914
Snippet name: scoredSearchInAllStringFields_impl
Eternal ID of this version: #1021914/4
Text MD5: 63bb82a9e1e5fd7886ec9ad364eca4d4
Author: stefan
Category: javax / discord
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-03 15:58:47
Source code size: 416 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 224 / 254
Version history: 3 change(s)
Referenced in: [show references]