Class RoundRobin.NameValue

java.lang.Object
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

    Fields
    Modifier and Type
    Field
    Description
    private String
    Stores the name of the pair (the left handside of the mapping).
    private int
    Stores the corresponding value to the name in the pair.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor which initialises the class member variables.
    NameValue(String name, int value)
    Initialises the class member variables to the values passed in the arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of this object.
    Returns the key of this pair, i.e the left hand side of the mapping.
    int
    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.
    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 Details

    • 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 Details

    • NameValue

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

      public 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 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

      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