GridSim 5.0 beta

gridsim.parallel
Class SSGridletList

Object
  extended by AbstractCollection<E>
      extended by AbstractList<E>
          extended by ArrayList<SSGridlet>
              extended by SSGridletList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<SSGridlet>, Collection<SSGridlet>, List<SSGridlet>, RandomAccess

public class SSGridletList
extends ArrayList<SSGridlet>

SSGridletList maintains a list of SSGridlet's

Since:
5.0
Author:
Marcos Dias de Assuncao
See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractList
modCount
 
Constructor Summary
SSGridletList()
           
 
Method Summary
 SSGridlet get(int gridletId, int userId)
          Returns a given SSGridlet.
 int indexOf(int gridletId, int userId)
          Finds the index of a SSGridlet inside the list.
 
Methods inherited from class ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

SSGridletList

public SSGridletList()
Method Detail

indexOf

public int indexOf(int gridletId,
                   int userId)
Finds the index of a SSGridlet inside the list. This method needs a combination of gridlet Id and User Id because each Grid User might have exactly the same gridlet Id.

Parameters:
gridletId - a gridlet Id
userId - an User Id
Returns:
the index in this list of the first occurrence of the specified Gridlet, or -1 if the list does not contain this Gridlet.
Pre Condition:
gridletId >= 0, userId >= 0
Post Condition:
$none

get

public SSGridlet get(int gridletId,
                     int userId)
Returns a given SSGridlet. This method needs a combination of gridlet Id and User Id because each Grid Users might have exactly same gridlet Ids.

Parameters:
gridletId - a gridlet Id
userId - an User Id
Returns:
the Gridlet or null if not found. Id and user id is not in the list.
Pre Condition:
gridletId >= 0, userId >= 0
Post Condition:
$none

GridSim 5.0 beta

The University of Melbourne, Australia, 2009