Map.remove
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מסירה את הפריט הנתון מהמפה, אם הוא קיים.
הפונקציה מחזירה את הפריט שהוסר או null אם הוא לא נוסף למפה.
שימוש | החזרות |
---|
Map.remove(item) | אובייקט |
ארגומנט | סוג | פרטים |
---|
item | אובייקט | הפריט שרוצים להסיר. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eMap.remove()\u003c/code\u003e deletes a specific item from the map if it's present.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns the removed item, or null if the item wasn't in the map.\u003c/p\u003e\n"]]],["The `Map.remove(item)` function removes a specified item from a map. It takes one argument, `item`, which is the object intended for removal. The function returns the removed object if it was present in the map; otherwise, it returns `null`, indicating the item was not found. The return type is an Object. The function's purpose is to delete an entry if present and report its status.\n"],null,["# Map.remove\n\n\u003cbr /\u003e\n\nRemoves the given item from the map, if it exists.\n\n\u003cbr /\u003e\n\nReturns the removed item or null if it hadn't been added to the map.\n\n| Usage | Returns |\n|--------------------|---------|\n| `Map.remove(item)` | Object |\n\n| Argument | Type | Details |\n|----------|--------|---------------------|\n| `item` | Object | The item to remove. |"]]