ResCloudletList (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.lists

## Class ResCloudletList

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

-     public class ResCloudletList
      extends Object

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResCloudletList()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends ResCloudlet> ResCloudlet` | `getByIdAndUserId(List<T> list, int cloudletId, int userId)` Returns a given Cloudlet.
    `static <T extends ResCloudlet> int` | `indexOf(List<T> list, int cloudletId, int userId)` Finds the index of a Cloudlet inside the list.
    `static <T extends ResCloudlet> boolean` | `move(List<T> listFrom, List<T> listTo, T cloudlet)` Move a ResCloudlet object from this linked-list into a specified one.

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

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

- - ### Constructor Detail

    - #### ResCloudletList

          public ResCloudletList()

  - ### Method Detail

    - #### getByIdAndUserId

          public static <T extends ResCloudlet> ResCloudlet getByIdAndUserId(List<T> list,
                                                             int cloudletId,
                                                             int userId)

      Returns a given Cloudlet. This method needs a combination of Cloudlet Id and User Id because each Cloud Users might have exactly same Cloudlet Ids.
      Parameters:
        `cloudletId` - a Cloudlet Id
        `userId` - an User Id
        `list` - the list
      Returns:
        the Cloudlet.
      Throws:
        `IndexOutOfBoundsException` - - if a Cloudlet with specified Id and user id is not in the list.

    - #### indexOf

          public static <T extends ResCloudlet> int indexOf(List<T> list,
                                            int cloudletId,
                                            int userId)

      Finds the index of a Cloudlet inside the list. This method needs a combination of Cloudlet Id and User Id because each Cloud User might have exactly the same Cloudlet Id.
      Parameters:
        `cloudletId` - a Cloudlet Id
        `userId` - an User Id
        `list` - the list
      Returns:
        the index in this list of the first occurrence of the specified Cloudlet, or `-1` if the list does not contain this Cloudlet.

    - #### move

          public static <T extends ResCloudlet> boolean move(List<T> listFrom,
                                             List<T> listTo,
                                             T cloudlet)

      Move a ResCloudlet object from this linked-list into a specified one.
      Parameters:
        `listFrom` - the list from
        `listTo` - the list to
        `cloudlet` - the cloudlet
      Returns:
        true if the moving operation successful, otherwise return false

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