ee.List.getNumber
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca liczbę na określonej pozycji na liście. Ujemny indeks liczy się wstecz od końca listy. Jeśli wartość nie jest liczbą, wystąpi błąd.
Wykorzystanie | Zwroty |
---|
List.getNumber(index) | Liczba |
Argument | Typ | Szczegóły |
---|
to: list | Lista | |
index | Liczba całkowita | |
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 function retrieves a number from a given position within a list.\u003c/p\u003e\n"],["\u003cp\u003eNegative indexing allows accessing elements from the end of the list.\u003c/p\u003e\n"],["\u003cp\u003eProviding a non-numeric value or an index outside the list range results in an error.\u003c/p\u003e\n"],["\u003cp\u003eThe function is used by calling \u003ccode\u003eList.getNumber()\u003c/code\u003e and providing the desired index as an argument.\u003c/p\u003e\n"]]],[],null,["# ee.List.getNumber\n\nReturns the number at the specified position in list. A negative index counts backwards from the end of the list. If the value is not a number, an error will occur.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------|---------|\n| List.getNumber`(index)` | Number |\n\n| Argument | Type | Details |\n|--------------|---------|---------|\n| this: `list` | List | |\n| `index` | Integer | |"]]