Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.List.contains
Stay organized with collections
Save and categorize content based on your preferences.
Returns true if list contains element.
Usage | Returns | List.contains(element) | Boolean |
Argument | Type | Details | this: list | List | |
element | Object | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThis method checks if a given element is present within a list.\u003c/p\u003e\n"],["\u003cp\u003eIt returns true if the element is found in the list, otherwise it returns false.\u003c/p\u003e\n"],["\u003cp\u003eThe method takes the list and the element to search for as arguments.\u003c/p\u003e\n"]]],["The core function, `List.contains(element)`, checks for the presence of a specified element within a list. It accepts two arguments: the `list` itself (of type List) and the `element` (of type Object) to search for. The function returns a Boolean value, specifically `true` if the `element` exists in the `list`, and presumably `false` otherwise.\n"],null,["# ee.List.contains\n\nReturns true if list contains element.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------|---------|\n| List.contains`(element)` | Boolean |\n\n| Argument | Type | Details |\n|--------------|--------|---------|\n| this: `list` | List | |\n| `element` | Object | |"]]