pl.edu.agh.cast.model.visual
Class Statistic

java.lang.Object
  extended by pl.edu.agh.cast.model.visual.Statistic

public class Statistic
extends java.lang.Object

The Statistics class represents single row of statistics of given domain model, which corresponds to single graph node. The important properties of the default statistics are:

There are helper methods which provide string representations of the properties, which are numbers. Domain statistics may provide different meaning for these properties (e.g. the number of sent and received short messages, the amount of money transfered, etc.) There is also one special type of statistics - the summary row. It doesn't correspond to any graph node, but summarizes the statistics. It appears at the end of the statistics, and by default contains the total number of nodes and total number of source and target edges. This row is indicated by the isSummary flag. The row is constructed by the statistics dialog, so should not be provided by domain-specific statistic providers.

Author:
Aleksander Pohl apohllo..o2.pl

Constructor Summary
Statistic(java.lang.String nodeName)
           
Statistic(java.lang.String nodeName, double outgoing, double incoming)
           
Statistic(java.lang.String nodeName, int outgoing, int incoming)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String getNodeName()
          The name of the node which correspond to this statistics row.
 double getSource()
          The value of the statistics for the source edges.
 java.lang.String getSourceLabel()
          The label (i.e.
 double getTarget()
          The value of the statistics for the target edges.
 java.lang.String getTargetLabel()
          The label (i.e.
 double getTotal()
          The total value of the statistics row.
 java.lang.String getTotalLabel()
          The label of the total value of the statistics row.
 int hashCode()
           
 boolean isSummary()
          Is the statistic row a special (summary) row? It will always appear at the end of the statistics dialog.
 void setNodeName(java.lang.String nodeName)
           
 void setSource(double outgoing)
           
 void setSummary(boolean value)
          Set the summary flag
 void setTarget(double incoming)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Statistic

public Statistic(java.lang.String nodeName,
                 int outgoing,
                 int incoming)

Statistic

public Statistic(java.lang.String nodeName,
                 double outgoing,
                 double incoming)

Statistic

public Statistic(java.lang.String nodeName)
Method Detail

setSummary

public void setSummary(boolean value)
Set the summary flag

Parameters:
value - The new flag value

isSummary

public boolean isSummary()
Is the statistic row a special (summary) row? It will always appear at the end of the statistics dialog.

Returns:
The summary flag.

getNodeName

public java.lang.String getNodeName()
The name of the node which correspond to this statistics row.


setNodeName

public void setNodeName(java.lang.String nodeName)

getSource

public double getSource()
The value of the statistics for the source edges.

Returns:

setSource

public void setSource(double outgoing)

getTarget

public double getTarget()
The value of the statistics for the target edges.

Returns:

setTarget

public void setTarget(double incoming)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTargetLabel

public java.lang.String getTargetLabel()
The label (i.e. string representation) of the value of the statistics of the target edges.

Returns:

getSourceLabel

public java.lang.String getSourceLabel()
The label (i.e. string representation) of the value of the statistics of the source edges.

Returns:

getTotal

public double getTotal()
The total value of the statistics row.

Returns:

getTotalLabel

public java.lang.String getTotalLabel()
The label of the total value of the statistics row.

Returns:


Copyright © 2007-2008 AGH University of Science and Technology. All Rights Reserved.