I do not know what to look at the source code, just want to see ...
Java.util.Collection This is an interface, which is the root interface of the collection framework in Java.
Here's a look at some of the methods defined in the interface
Public interface collection<e> extends iterable<e>{ //methods for manipulating collection elements Boolean add (e e);//add element E to the collection boolean addall (collection<? extends e> c);//Add the collection C to the collection as a boolean remove (Object o);//Remove the O element from the collection Boolean RemoveAll (collection<?> c);//delete the C set void Clear () from the collection,//Empty the collection with a boolean retainall (Collection <?> c)////Only the elements in the collection that are also contained in the specified set C //Query method Boolean contains (Object o);//Determine whether the element o is in the collection Boolean Containsall (collection<?> c);//Determines whether set C is a boolean isEmpty () in the set, or whether the collection is an element int size ();// Returns the number of elements of the collection //Other methods object[] ToArray (); <T> t[] ToArray (t[] a); Iterator<e> Iterator (); Boolean equals (Object O); int hashcode ();}
You can see the above collection interface 16 methods, the operation of the collection element method has 6, the query method has 4, the other method has 5. This is just an interface, all of which are defined method bodies, followed by a detailed analysis of how each method is implemented in its implementation class (it is very exciting to have a personal sense of how to implement the above 16 methods in an implementation class)
Java Source (4)--java.util.Collection