Using Classes as Paramaterized Types

14 views Asked by At

I'm currently working with CloudSIM and doing a bit of experimenting but I've run across this I've never seen before. For instance, in some of the examples, they'll use a setup like this:

private static List<Vm> vmList;

or

private static List<Cloudlet> cloudletList;

Now the question I'm a bit confused on is that both of these are lists; and they are using the 'VM' and 'Cloudlet' as one of the parameterized types; however I'm not sure why. I understand that we use these to catch errors at compile time, however from what I've observed, the only examples I have seen have used types such as or or or . These are already defined and have obvious uses.

These classes are defined in the CloudSIM package of course in their own classes, but I'm not understanding the purposes of using these defined classes as opposed to just using or such. Could someone exmplain why we would do so?

0

There are 0 answers