VmList (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.lists

## Class VmList

- java.lang.Object
- - org.cloudbus.cloudsim.lists.VmList

- Direct Known Subclasses:
    PowerVmList

      public class VmList
      extends Object

  VmList is a collection of operations on lists of VMs.
  Since:
    CloudSim Toolkit 2.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VmList()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends Vm> T` | `getById(List<T> vmList, int id)` Return a reference to a Vm object from its ID.
    `static <T extends Vm> T` | `getByIdAndUserId(List<T> vmList, int id, int userId)` Return a reference to a Vm object from its ID and user ID.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VmList

          public VmList()

  - ### Method Detail

    - #### getById

          public static <T extends Vm> T getById(List<T> vmList,
                                 int id)

      Return a reference to a Vm object from its ID.
      Parameters:
        `id` - ID of required VM
        `vmList` - the vm list
      Returns:
        Vm with the given ID, $null if not found

    - #### getByIdAndUserId

          public static <T extends Vm> T getByIdAndUserId(List<T> vmList,
                                          int id,
                                          int userId)

      Return a reference to a Vm object from its ID and user ID.
      Parameters:
        `id` - ID of required VM
        `userId` - the user ID
        `vmList` - the vm list
      Returns:
        Vm with the given ID, $null if not found

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.