|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpulling.availability_imposer.Node
public class Node
This class represents a Node in the Availability node. Every node represents a state of availability for the server.
Constructor Summary | |
---|---|
Node(double aj,
java.lang.String description,
long periodToStay)
The default constructor |
Method Summary | |
---|---|
void |
addArch(double probability,
Node distinatioNode)
This method is used to add an Arch. |
java.util.LinkedList<Arch> |
getArchs()
|
java.lang.String |
getDescription()
|
Node |
getNeighbour(int i)
|
int |
getNeighboursNumber()
|
long |
getPeriodToStay()
|
double |
getPropability(int i)
|
boolean |
isSumValid()
This method checks if the sum of the probabilities of Archs are valid |
void |
print()
|
void |
setArchs(java.util.LinkedList<Arch> archs)
|
void |
setDescription(java.lang.String description)
|
void |
setPeriodToStay(long periodToStay)
|
java.lang.String |
toString()
|
void |
visit()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node(double aj, java.lang.String description, long periodToStay)
aj
- description
- periodToStay
- Method Detail |
---|
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public long getPeriodToStay()
public void setPeriodToStay(long periodToStay)
public java.util.LinkedList<Arch> getArchs()
public void setArchs(java.util.LinkedList<Arch> archs)
public void addArch(double probability, Node distinatioNode)
probability
- is the probability of the added node.distinatioNode
- is the destination node.public boolean isSumValid()
public int getNeighboursNumber()
public Node getNeighbour(int i)
i
- a number
public double getPropability(int i)
i
- a number
public java.lang.String toString()
toString
in class java.lang.Object
public void visit()
public void print()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |