public class Flow
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private java.lang.String |
alias |
|
private ArrivalCurve |
arrival_curve |
The flow's arrival curve
|
private int |
id |
The flow's ID.
|
static Flow |
NULL_FLOW |
|
private Path |
path |
The link path the flow traverses incl explicit sink
|
Modifier | Constructor | Description |
---|---|---|
private |
Flow() |
|
protected |
Flow(int id,
java.lang.String alias,
ArrivalCurve ac,
Path path) |
Modifier and Type | Method | Description |
---|---|---|
static Flow |
createDummyFlow(java.lang.String alias,
ArrivalCurve ac,
Path path) |
Creates a dummy flow with an arrival curve.
All dummy flows share the same id -1. |
java.lang.String |
getAlias() |
|
ArrivalCurve |
getArrivalCurve() |
|
int |
getId() |
|
java.util.List<Link> |
getLinksOnPath() |
|
Path |
getPath() |
|
Link |
getPrecedingLink(Server s) |
|
Server |
getPrecedingServer(Server s) |
|
java.util.LinkedList<Server> |
getServersOnPath() |
|
Server |
getSink() |
|
Server |
getSource() |
|
Path |
getSubPath(Server from,
Server to) |
|
Link |
getSucceedingLink(Server s) |
|
Server |
getSucceedingServer(Server s) |
|
void |
setAlias(java.lang.String alias) |
|
boolean |
setArrivalCurve(ArrivalCurve arrival_curve) |
|
java.lang.String |
toLongString() |
|
java.lang.String |
toShortString() |
|
java.lang.String |
toString() |
public static final Flow NULL_FLOW
private int id
private ArrivalCurve arrival_curve
private java.lang.String alias
private Path path
protected Flow(int id, java.lang.String alias, ArrivalCurve ac, Path path)
id
- The flow's id (unique).alias
- The flow's alias (not necessarily unique).ac
- The flow's arrival curve.path
- The link path the flow traverses.private Flow()
public static Flow createDummyFlow(java.lang.String alias, ArrivalCurve ac, Path path)
alias
- The flow's alias (not necessarily unique).ac
- The flow's arrival curve.path
- The link path the flow traverses.public boolean setArrivalCurve(ArrivalCurve arrival_curve)
public ArrivalCurve getArrivalCurve()
public int getId()
public java.lang.String getAlias()
public void setAlias(java.lang.String alias)
public Path getPath()
public java.lang.String toShortString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toLongString()
public Server getSource()
public Server getSink()
public java.util.LinkedList<Server> getServersOnPath()
public java.util.List<Link> getLinksOnPath() throws java.lang.Exception
java.lang.Exception
public Path getSubPath(Server from, Server to) throws java.lang.Exception
from
- Source, inclusive.to
- Sink, inclusive.java.lang.Exception
- No subpath found; most probably an input parameter problem.public Link getPrecedingLink(Server s) throws java.lang.Exception
java.lang.Exception
public Link getSucceedingLink(Server s) throws java.lang.Exception
java.lang.Exception
public Server getPrecedingServer(Server s) throws java.lang.Exception
java.lang.Exception