10-1Data Structures--Collections

The course is mainly about collections.Generally covered the collections landscape,wildcards,the collections framework,collections relationships,Pitfall:optional operations,concrete collections classes and so on.
展开查看详情

1.

2.Collection ArrayList<T> Collection Collection Adapted from material by Walter Savitch

3.Adapted from material by Walter Savitch

4.public void method(String arg1, ArrayList<?> arg2) String ArrayList<T> Adapted from material by Walter Savitch

5.<? extends String> String <? super String> String Adapted from material by Walter Savitch

6.Collection<T> Collection<T> Adapted from material by Walter Savitch

7.Method Headings in the Collection<T> Interface (Part 1 of 10) Adapted from material by Walter Savitch

8.Method Headings in the Collection<T> Interface (Part 2 of 10) Adapted from material by Walter Savitch

9.Method Headings in the Collection<T> Interface (Part 3 of 10) Adapted from material by Walter Savitch

10.Method Headings in the Collection<T> Interface (Part 4 of 10) Adapted from material by Walter Savitch

11.Method Headings in the Collection<T> Interface (Part 5 of 10) Adapted from material by Walter Savitch

12.Method Headings in the Collection<T> Interface (Part 6 of 10) Adapted from material by Walter Savitch

13.Method Headings in the Collection<T> Interface (Part 7 of 10) Adapted from material by Walter Savitch

14.Method Headings in the Collection<T> Interface (Part 8 of 10) Adapted from material by Walter Savitch

15.Method Headings in the Collection<T> Interface (Part 9 of 10) Adapted from material by Walter Savitch

16.Method Headings in the Collection<T> Interface (Part 10 of 10) Adapted from material by Walter Savitch

17.Collection<T> Collection<T> Collection<T> Set<T> List<T> Adapted from material by Walter Savitch

18. Set<T> Set<T> Collection<T> Collection<T> Set<T> Adapted from material by Walter Savitch

19. List<T> List<T> List<T> Collection<T> Collection<T> List<T> ArrayList<T> List<T> Adapted from material by Walter Savitch

20. Set<T> The Set<T> interface is in the java.util package. The Set<T> interface extends the Collection<T> interface and has all the same method headings. However, the semantics of the add methods vary as described below. public boolean add(T element) (Optional) If element is not already in the calling object, element is added to the calling object and true is returned. If element is in the calling object, the calling object is unchanged and false is returned. public boolean addAll(Collection<? extends T> collectionToAdd) (Optional) Ensures that the calling object contains all the elements in collectionToAdd. Returns true if the calling object changed as a result of the call; returns false otherwise. Thus, if collectionToAdd is a Set<T>, then the calling object is changed to the union of itself with collectionToAdd. Adapted from material by Walter Savitch

21.The List<T> interface has more method headings than the Collection<T> interface. Adapted from material by Walter Savitch

22.Adapted from material by Walter Savitch

23.Adapted from material by Walter Savitch

24.Adapted from material by Walter Savitch

25.Adapted from material by Walter Savitch

26.Adapted from material by Walter Savitch

27.Adapted from material by Walter Savitch

28.Adapted from material by Walter Savitch

29.Adapted from material by Walter Savitch