This section summarizes the Bi Xiangdong Teacher's public lessons from the Preach Intelligence podcast, thanks to Bi Xiangdong teacher! If there is a mistake, you are welcome to advise!
common methods for Collection collections:
Add, delete, size, include (, include all), empty, empty, iterate, and overlap;
Boolean Add (E o); Boolean remove (Object O); int size (); Boolean contains (Object O); Boolean isEmpty (); void Clear (); Iterator<e> Iterator ();
Boolean AddAll (Collection c); Boolean retainall (Collection c); Boolean RemoveAll (Collection c);
common methods for set collections:
with the the Collection collection has the same method;
common methods for List collections:
In the list collection method, the index parameter (the corner mark) is the new method, the operation with the angle mark is the array principle;
In addition to inheriting The methods of Collection collections, as well as the following own unique methods, are related to indexes (subscripts):
Add, delete, modify (can only be modified, not insert), find (get) elements, find the location of the element (two);
void Add (int index, e e); E Remove (int index); e Set (int index, e e); E get (int index); int indexOf (Object o); int lastIndexOf (Object o);
common methods for MAP collections:
Add, delete, modify, find (get), size, include, empty, empty, iterate
V put (k K, v v); V Remove (Object k); The put () method also modifies the function V get (Object k); int size (); Boolean ContainsKey (Object k);
Boolean containsvalue (Object v); Boolean isEmpty (); void Clear ();
Learning about the Java Collection framework