faa.tg.dra.objects
Class DraCount

java.lang.Object
  extended by faa.tg.recording.state.State
      extended by faa.tg.dra.objects.DraCount
All Implemented Interfaces:
DelimWritable, TextWritable, HasName, HasSimTime, Filterable, Recordable, ManagedObject, java.io.Serializable

public class DraCount
extends State
implements TextWritable, DelimWritable

 DraCount is a Recordable that is used to define an object containing
 totals and interval counts of Recordables received. This Recordable is
 generated by DraCounter. Information about the sort criteria is
 available. DraCount can print its information out to a String.
 
See the source: DraCount.java

Version:
$Id: DraCount.java,v 3.1 2006/03/14 15:55:32 samf Exp $
Author:
Dana N. Whicker, FAA/ACT-510 Tue Aug 10 14:18:00 EST 1999
See Also:
Serialized Form

Field Summary
private  java.lang.Class classInst
           
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  int interval
           
private  int intervalCount
           
private static MethodMap methodMap
           
private  java.lang.String name
           
(package private) static long serialVersionUID
           
private  SimulationTime simTime
           
private  int totalCount
           
 
Constructor Summary
DraCount(int totalCount, int intervalCount, int interval, SimulationTime simTime, java.lang.String name, java.lang.Class classInst)
          Constructs the DraCount object from values passed as parameters.
 
Method Summary
 java.lang.Object getClassInst()
          Gets the object of the class instance that was filtered on.
 int getCurrIntervalNum()
          Returns the current interval number (the number of intervals since the beginning of the sim).
 java.lang.String getDelimHeader()
          Gets a header string for delimited reports for DraCount information.
 int getInterval()
          Gets the length of the interval of time to count events for.
 int getIntervalCount()
          Returns the count of DraEvents matching the class instance & name for the interval ending at simTime.
 MethodMap getMethodMap()
          Returns the DraCount information in DelimWritable format.
 java.lang.String getName()
          Gets the Recordable name filtered on or "" if none selected.
 SimulationTime getSimTime()
          Gets the simulation time events were counted up to.
 SimulationTime getStartTime()
          Gets the start of the interval for the simulation time events.
 int getTotalCount()
          Returns the total count of DraEvents matching the class instance and name, up to simTime time.
private static MethodMap makeMethodMap()
          Creates the DraCount information in DelimWritable format
 java.lang.String toDraText()
          Returns the DR&A information as a text String.
 java.lang.String toString()
          Prints the DraCount information to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

totalCount

private int totalCount

intervalCount

private int intervalCount

interval

private int interval

simTime

private SimulationTime simTime

name

private java.lang.String name

classInst

private java.lang.Class classInst

methodMap

private static MethodMap methodMap
Constructor Detail

DraCount

public DraCount(int totalCount,
                int intervalCount,
                int interval,
                SimulationTime simTime,
                java.lang.String name,
                java.lang.Class classInst)
Constructs the DraCount object from values passed as parameters.

Parameters:
totalCount - Total count of matching DraEvents up to simTime.
intervalCount - Count of matching DraEvents for interval ending at simTime.
interval - Interval of time to count events for.
simTime - Simulation time at which totals were taken.
name - Recordable name that was filtered on (null if not used).
classInst - Object of the class instance that was filtered on.
Method Detail

getName

public java.lang.String getName()
Gets the Recordable name filtered on or "" if none selected.

Specified by:
getName in interface ManagedObject
Specified by:
getName in class State
Returns:
Returns the Recordable name filtered on or "" if none selected.

getClassInst

public java.lang.Object getClassInst()
Gets the object of the class instance that was filtered on.

Returns:
Returns the object of the class instance that was filtered on.

getCurrIntervalNum

public int getCurrIntervalNum()
Returns the current interval number (the number of intervals since the beginning of the sim).

Returns:
Returns the number of the current interval.

getInterval

public int getInterval()
Gets the length of the interval of time to count events for.

Returns:
Returns the length of the interval of time to count events for.

getIntervalCount

public int getIntervalCount()
Returns the count of DraEvents matching the class instance & name for the interval ending at simTime.

Returns:
Returns the interval count.

getSimTime

public SimulationTime getSimTime()
Gets the simulation time events were counted up to.

Specified by:
getSimTime in interface HasSimTime
Specified by:
getSimTime in class State
Returns:
Returns the simulation time events were counted up to.

getStartTime

public SimulationTime getStartTime()
Gets the start of the interval for the simulation time events.

Returns:
Returns the start of the interval for the simulation time events.

getTotalCount

public int getTotalCount()
Returns the total count of DraEvents matching the class instance and name, up to simTime time.

Returns:
Returns the total count.

getDelimHeader

public java.lang.String getDelimHeader()
Gets a header string for delimited reports for DraCount information.

Returns:
Returns header string for delimited reports for DraCount info.

getMethodMap

public MethodMap getMethodMap()
Returns the DraCount information in DelimWritable format. Doesn't include class instance requirement value in output list.

Specified by:
getMethodMap in interface DelimWritable
Returns:
Returns fields as a MethodMap of MethodSpec objects.

makeMethodMap

private static MethodMap makeMethodMap()
Creates the DraCount information in DelimWritable format


toDraText

public java.lang.String toDraText()
Returns the DR&A information as a text String.

Specified by:
toDraText in interface TextWritable
Returns:
Returns the AircraftState information in TextWritable format.

toString

public java.lang.String toString()
Prints the DraCount information to a String.

Overrides:
toString in class java.lang.Object
Returns:
Returns the DraCount information in string format.