ee.List.zip
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
จับคู่องค์ประกอบของ 2 รายการเพื่อสร้างรายการของรายการที่มี 2 องค์ประกอบ เมื่อรายการอินพุตมีขนาดต่างกัน รายการสุดท้ายจะมีขนาดเท่ากับรายการที่สั้นที่สุด
การใช้งาน | การคืนสินค้า |
---|
List.zip(other) | รายการ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ list | รายการ | |
other | รายการ | |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eList.zip\u003c/code\u003e combines two lists by pairing corresponding elements, creating a new list of two-element lists.\u003c/p\u003e\n"],["\u003cp\u003eThe resulting list's length is determined by the shorter of the two input lists, ensuring all elements have a pair.\u003c/p\u003e\n"]]],["Combines two lists into a single list of two-element lists, pairing corresponding elements. The resulting list's length matches the shorter of the two input lists. The `List.zip(other)` function takes two list arguments: `this`, representing the initial list, and `other`, the second list. It returns a new List containing paired elements. If the lists are of differing lengths, extra items in the longer list are not included.\n"],null,["# ee.List.zip\n\nPairs the elements of two lists to create a list of two-element lists. When the input lists are of different sizes, the final list has the same size as the shortest one.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------|---------|\n| List.zip`(other)` | List |\n\n| Argument | Type | Details |\n|--------------|------|---------|\n| this: `list` | List | |\n| `other` | List | |"]]