ee.List.indexOfSublist
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca pozycję początkową pierwszego wystąpienia elementu docelowego na liście lub -1, jeśli takie wystąpienie nie istnieje.
Wykorzystanie | Zwroty |
---|
List.indexOfSublist(target) | Liczba całkowita |
Argument | Typ | Szczegóły |
---|
to: list | Lista | |
target | Lista | |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThis method searches for the first occurrence of a specific sublist (target) within a larger list.\u003c/p\u003e\n"],["\u003cp\u003eIt returns the starting index (position) of the sublist if found, otherwise, it returns -1.\u003c/p\u003e\n"],["\u003cp\u003eThe method is used by calling \u003ccode\u003eindexOfSublist\u003c/code\u003e on the main list and providing the target sublist as an argument.\u003c/p\u003e\n"]]],[],null,["# ee.List.indexOfSublist\n\nReturns the starting position of the first occurrence of target within list, or -1 if there is no such occurrence.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------|---------|\n| List.indexOfSublist`(target)` | Integer |\n\n| Argument | Type | Details |\n|--------------|------|---------|\n| this: `list` | List | |\n| `target` | List | |"]]