| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbcds.phison.io.GraphWriter<V,E>
public abstract class GraphWriter<V,E>
Base class for all topology file writers; it defines both an
 interface and useful methods and data for derived classes.
 For a SimGraph to be writable, its nodes must implement
 GraphIONode.
| Constructor Summary | |
|---|---|
GraphWriter(java.lang.String fname,
            SimGraph<V,E> g)
 | 
|
GraphWriter(java.io.Writer wr,
            SimGraph<V,E> g)
Creates a GraphWriter for g and prepares a buffered
 writer around wr. | 
|
| Method Summary | |
|---|---|
 void | 
printf(java.lang.String fmt,
       java.lang.Object... args)
Writes a formatted string to the output stream.  | 
 void | 
setCapacityMap(java.util.Map<E,java.lang.Integer> cap)
Saves a reference to the capacity map that will be written out by writeAll(). | 
 void | 
setCostMap(java.util.Map<E,? extends java.lang.Number> cost)
Saves a reference to the cost map that will be written out by writeAll(). | 
 void | 
setHeadingComment(java.lang.String comment)
Sets a comment that is typically written at the beginning of the output file (for example, a time stamp).  | 
 void | 
setNetName(java.lang.String netname)
Sets a name/identification of the topology to be written.  | 
 void | 
setTrafficMatrix(java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
Saves a reference to the traffic matrix that will be written out by writeAll(). | 
 void | 
write(java.lang.String netname,
      java.lang.String heading_comment,
      java.util.Map<E,java.lang.Integer> capacity_map,
      java.util.Map<E,? extends java.lang.Number> cost_map,
      java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
Calls the appropriate setters ( setCapacityMap(),
 setCostMap(), etc.), and finally invokes
 writeAll(). | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GraphWriter(java.io.Writer wr,
                   SimGraph<V,E> g)
g and prepares a buffered
 writer around wr.
public GraphWriter(java.lang.String fname,
                   SimGraph<V,E> g)
| Method Detail | 
|---|
public void write(java.lang.String netname,
                  java.lang.String heading_comment,
                  java.util.Map<E,java.lang.Integer> capacity_map,
                  java.util.Map<E,? extends java.lang.Number> cost_map,
                  java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
setCapacityMap(),
 setCostMap(), etc.), and finally invokes
 writeAll().
public void setNetName(java.lang.String netname)
public void setHeadingComment(java.lang.String comment)
comment must be consistent with the format of the
 output.
public void setCostMap(java.util.Map<E,? extends java.lang.Number> cost)
writeAll(). cost can be null.
public void setCapacityMap(java.util.Map<E,java.lang.Integer> cap)
writeAll().
public void setTrafficMatrix(java.util.Map<SimplePair<V,V>,java.lang.Double> trf)
writeAll(). trf can be null.
public void printf(java.lang.String fmt,
                   java.lang.Object... args)
AnyException - wrapping an IOException if an IO
         error occurs.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||