1

00:00:01,150  -->  00:00:06,270
OK let's not begin by looking at that collection interface which is the root of the collection hierarchy

2

00:00:07,520  -->  00:00:11,190
under to present a collection of objects.

3

00:00:11,190  -->  00:00:16,040
Now since it is the polymorphically it but what's maximum generality.

4

00:00:16,320  -->  00:00:23,110
So whenever possible you should use it to reference objects on some collections like idlest alone triplicates

5

00:00:23,380  -->  00:00:27,560
when others like set implementations do not allow triplicates.

6

00:00:28,140  -->  00:00:35,080
Similarly some collections like or a list are ordered while others like Hosh set are unordered.

7

00:00:35,300  -->  00:00:41,130
Finally even though the collection has different subway interfaces but it has only one bit at sapless

8

00:00:41,280  -->  00:00:46,980
under his Carlists abstract collection which It's a skeleton implementation of the collection interface

9

00:00:46,980  -->  00:00:47,740
.

10

00:00:47,750  -->  00:00:54,450
I recall that is gilet an implementation helps in minimizing the effort needed to implement the corresponding

11

00:00:54,450  -->  00:01:00,640
interface and is the declaration of the collection interface reductions and other into Fischl.

12

00:01:00,690  -->  00:01:06,770
It did a bill which would enable any collection object to be used in each loops.

13

00:01:06,840  -->  00:01:10,600
You did a from Gelada outline package and it has one abstract method.

14

00:01:10,670  -->  00:01:16,840
Call it director Victor subclass hospital implemented little when we get them off our list.

15

00:01:16,870  -->  00:01:20,240
We will look at the trade and method which I finished implements.

16

00:01:20,700  -->  00:01:26,430
So if you want instances of your class to be used for each statement then you need to implement a durable

17

00:01:26,430  -->  00:01:30,960
interface and provide an implementation for each character method.

18

00:01:30,960  -->  00:01:36,010
Also let's run for the greater unless done notations here they're related to genetics.

19

00:01:36,100  -->  00:01:38,420
Unrepaired be clear when we get there.

20

00:01:39,000  -->  00:01:45,120
No collection interface includes several fundamental methods common to all collections and they can

21

00:01:45,120  -->  00:01:48,340
be broadly classified into three categories.

22

00:01:48,620  -->  00:01:56,670
First class of methods can be referred to as basic operations on second and bulk operations on Turdus

23

00:01:57,030  -->  00:01:58,590
operations.

24

00:01:58,590  -->  00:02:05,940
Let's not look at the methods in each of these categories and hit them at the fall and basic operations

25

00:02:06,800  -->  00:02:07,350
Hesters.

26

00:02:07,390  -->  00:02:10,960
I admit that I did just add some to remember the collection.

27

00:02:11,280  -->  00:02:16,270
It returns a true or false depending on whether the element could be added or not.

28

00:02:16,290  -->  00:02:21,210
For instance if the collection does not support bootlick It's odd you are trying to add a duplicate

29

00:02:21,210  -->  00:02:21,880
element.

30

00:02:22,170  -->  00:02:26,850
Then the method would be done if false indicating that the element was not added.

31

00:02:27,220  -->  00:02:30,720
Also the notation in the parameter is genetics related.

32

00:02:30,720  -->  00:02:32,760
So let's not worry about it.

33

00:02:32,760  -->  00:02:37,380
Also note that the trailing comment says that IDE is an optional operation.

34

00:02:37,380  -->  00:02:40,280
It means that a subclass need not supported.

35

00:02:40,770  -->  00:02:43,360
That is it will define an empty Agde matter.

36

00:02:43,590  -->  00:02:45,200
Buckwalter an exception.

37

00:02:45,390  -->  00:02:52,500
Unsupported operation exception which indicates that it does not support an operation unsupported operation

38

00:02:52,500  -->  00:02:56,970
exception is an exception class from the jabat underlying package.

39

00:02:56,970  -->  00:03:02,700
Just note that we would also see some more optional operations in the collection interface but all the

40

00:03:02,700  -->  00:03:08,260
common implementations like de-list Hachette and so on which we are going to discuss later.

41

00:03:08,310  -->  00:03:11,850
Do implement all the optional operations.

42

00:03:11,850  -->  00:03:17,220
Second is that remote matter visually an element from the collection and it is also an optional operation

43

00:03:18,030  -->  00:03:19,660
on TOTUS contains matter.

44

00:03:19,920  -->  00:03:24,360
It allows you to check bids or not the collection contains the input element.

45

00:03:24,810  -->  00:03:31,680
So it is basically the search method and the size of the collection and 50 is to check whether or not

46

00:03:31,680  -->  00:03:37,050
the collection is empty and the final one is that it didn't matter which is inherited from the super

47

00:03:37,050  -->  00:03:37,560
interface.

48

00:03:37,590  -->  00:03:41,850
A did a poll on this matter return to an instance of iterator.

49

00:03:42,260  -->  00:03:47,390
I needed it for is an interface in the Gelada little package and it would help and it did it in the

50

00:03:47,400  -->  00:03:48,910
elements of the collection.

51

00:03:49,410  -->  00:03:56,280
As mentioned Nodier Vivan look at it did it matter when discussing auto list and here are the methods

52

00:03:56,400  -->  00:03:59,560
that both bulk operations on the collection object.

53

00:03:59,880  -->  00:04:05,850
Just one is out on motet which adds all the elements in the input collection object to the cut and collection

54

00:04:05,850  -->  00:04:07,200
object.

55

00:04:07,200  -->  00:04:08,360
Next is it a good one.

56

00:04:08,520  -->  00:04:13,620
It would remove all the elements in the cut and collection which are also present in the input collection

57

00:04:13,620  -->  00:04:14,570
object.

58

00:04:14,880  -->  00:04:20,790
So it is really an all I need is it to remove all that would retain all the elements in the current

59

00:04:20,790  -->  00:04:24,520
collection which are also present in the input collection object.

60

00:04:24,960  -->  00:04:30,990
In other words elements that are not present in the input collection object will be removed from this

61

00:04:30,990  -->  00:04:37,830
contains on cadenced true if the current collection contains all the elements in the collection object

62

00:04:38,690  -->  00:04:40,230
and the final one is clear.

63

00:04:40,230  -->  00:04:45,060
It simply removes all the elements in that collection so the collection object would be empty.

64

00:04:45,060  -->  00:04:48,430
After this method returns.

65

00:04:48,420  -->  00:04:51,930
And here are two methods that follow our operations.

66

00:04:51,930  -->  00:04:53,740
Both of them are redundant.

67

00:04:53,800  -->  00:04:58,670
I'm betting all events in the current collection Highwood in the first method.

68

00:04:58,710  -->  00:05:01,700
The added type is object so if needed.

69

00:05:01,740  -->  00:05:06,640
You may have to don't cast the elements appropriately in the second method.

70

00:05:06,780  -->  00:05:12,870
Type is more specific here JENNETT exploited notation is used and since we did not discuss genetics

71

00:05:12,870  -->  00:05:13,410
yet.

72

00:05:13,740  -->  00:05:15,760
Let's look at the example provided here.

73

00:05:16,020  -->  00:05:19,170
Which should be helpful in the example.

74

00:05:19,220  -->  00:05:24,890
As String arrays to know the input to them but there is also an empty string.

75

00:05:25,260  -->  00:05:30,810
So the type of the dictionary as well as the Bible to input array should match.

76

00:05:30,810  -->  00:05:36,240
If you look at the method declaration you will also see that that is just like an example.

77

00:05:36,360  -->  00:05:41,360
Type is same in both the return type as well as the input parameter type.

78

00:05:41,440  -->  00:05:47,280
No the elements in the collection should be of the same type as the type of the in pottery or must be

79

00:05:47,280  -->  00:05:50,680
a subtype otherwise an exception will be thrown.

80

00:05:51,200  -->  00:05:51,720
No.

81

00:05:51,810  -->  00:05:57,600
This is what happens if the input array size is less than the collection size.

82

00:05:57,690  -->  00:06:02,460
Then a new law is created and is written with the elements in the collection.

83

00:06:02,520  -->  00:06:08,400
But if the input array size is greater than or equal to the size of the collection then that's C is

84

00:06:08,410  -->  00:06:12,420
return after being fitted with the collection elements.

85

00:06:12,420  -->  00:06:18,060
Now if there are any slots left after filling the ID then those slots will be set to none.

86

00:06:18,300  -->  00:06:24,150
So those are the array operations and as you can see they act as Bridgemen it's between collections

87

00:06:24,360  -->  00:06:30,340
and address so that separate the collection interface on Boucek it opened the J.Y. API.

88

00:06:30,360  -->  00:06:30,780
Thank you
