Libraryless. Click here for Pure Java version (62L/1K).
1 | static <A> bool subListContains(L<A> l, int startIndex, int endIndex, A a) { |
2 | if (l == null) false; |
3 | int n = l.size(); |
4 | startIndex = Math.max(0, startIndex); |
5 | endIndex = Math.min(n, endIndex); |
6 | for (int i = startIndex; i < endIndex; i++) |
7 | if (eq(a, l.get(i))) |
8 | true; |
9 | false; |
10 | } |
Began life as a copy of #1002310
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035286 |
Snippet name: | subListContains |
Eternal ID of this version: | #1035286/3 |
Text MD5: | 9c4031ade1db54afe4c09d05a99857ae |
Transpilation MD5: | 9092ab7bf39e5ba2f64e0ce2eda6157c |
Author: | stefan |
Category: | javaxc |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-28 23:40:08 |
Source code size: | 299 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 138 / 189 |
Version history: | 2 change(s) |
Referenced in: | [show references] |