edu.isi.pegasus.planner.selector.site
Class RoundRobin.NameValue

java.lang.Object
  extended by edu.isi.pegasus.planner.selector.site.RoundRobin.NameValue
Enclosing class:
RoundRobin

 class RoundRobin.NameValue
extends Object

A inner name value class that associates a string with an int value. This is used to populate the round robin list that is used by this scheduler.


Field Summary
private  String name
          Stores the name of the pair (the left handside of the mapping).
private  int value
          Stores the corresponding value to the name in the pair.
 
Constructor Summary
RoundRobin.NameValue()
          The default constructor which initialises the class member variables.
RoundRobin.NameValue(String name, int value)
          Initialises the class member variables to the values passed in the arguments.
 
Method Summary
 Object clone()
          Returns a copy of this object.
 String getName()
          Returns the key of this pair, i.e the left hand side of the mapping.
 int getValue()
          Returns the value associated with this pair.
 void increment()
          Increments the int value by one.
 void setValue(int value)
          The set method to set the value.
 String toString()
          Writes out the contents of the class to a String in form suitable for displaying.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private String name
Stores the name of the pair (the left handside of the mapping).


value

private int value
Stores the corresponding value to the name in the pair.

Constructor Detail

RoundRobin.NameValue

public RoundRobin.NameValue()
The default constructor which initialises the class member variables.


RoundRobin.NameValue

public RoundRobin.NameValue(String name,
                            int value)
Initialises the class member variables to the values passed in the arguments.

Parameters:
name - corresponds to the name in the NameValue pair
value - corresponds to the value for the name in the NameValue pair
Method Detail

setValue

public void setValue(int value)
The set method to set the value.

Parameters:
value - int

getValue

public int getValue()
Returns the value associated with this pair.

Returns:
int

getName

public String getName()
Returns the key of this pair, i.e the left hand side of the mapping.

Returns:
String

increment

public void increment()
Increments the int value by one.


clone

public Object clone()
Returns a copy of this object.

Overrides:
clone in class Object
Returns:
Object

toString

public String toString()
Writes out the contents of the class to a String in form suitable for displaying.

Overrides:
toString in class Object
Returns:
String


Copyright © 2011 The University of Southern California. All Rights Reserved.