Class RoundRobin.NameValue
java.lang.Object
edu.isi.pegasus.planner.selector.site.RoundRobin.NameValue
- Enclosing class:
- RoundRobin
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this object.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
Increments the int value by one.void
setValue
(int value) The set method to set the value.toString()
Writes out the contents of the class to a String in form suitable for displaying.
-
Field Details
-
name
Stores the name of the pair (the left handside of the mapping). -
value
private int valueStores the corresponding value to the name in the pair.
-
-
Constructor Details
-
NameValue
public NameValue()The default constructor which initialises the class member variables. -
NameValue
Initialises the class member variables to the values passed in the arguments.- Parameters:
name
- corresponds to the name in the NameValue pairvalue
- corresponds to the value for the name in the NameValue pair
-
-
Method Details
-
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
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
Returns a copy of this object. -
toString
Writes out the contents of the class to a String in form suitable for displaying.
-