class RoundRobin.NameValue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.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 and Description |
---|
RoundRobin.NameValue()
The default constructor which initialises the class member variables.
|
RoundRobin.NameValue(java.lang.String name,
int value)
Initialises the class member variables to the values passed in the
arguments.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a copy of this object.
|
java.lang.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.
|
java.lang.String |
toString()
Writes out the contents of the class to a String in form suitable for
displaying.
|
private java.lang.String name
private int value
public RoundRobin.NameValue()
public RoundRobin.NameValue(java.lang.String name, int value)
name
- corresponds to the name in the NameValue pairvalue
- corresponds to the value for the name in the NameValue pairpublic void setValue(int value)
value
- intpublic int getValue()
public java.lang.String getName()
public void increment()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object