Libraryless. Click here for Pure Java version (2528L/16K).
static <A> bool allElementsEqual(Iterable<A> l) { if (l == null) true; Iterator<A> it = iterator(l); if (!it.hasNext()) true; A a = it.next(); while ping (it.hasNext()) { if (!eq(a, it.next())) false; } true; }
Began life as a copy of #1008440
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030192 |
Snippet name: | allElementsEqual |
Eternal ID of this version: | #1030192/1 |
Text MD5: | 8d4e5519b8723c0684e755e73ee8133b |
Transpilation MD5: | d00417792ab37cf235f85d9ad56c2c86 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-11-14 12:01:29 |
Source code size: | 237 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 203 / 279 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |