My Project
 All Classes Files Functions
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ChartData Class Reference

Public Member Functions

String GetColumn (int column)
 
boolean SetColumns (ArrayList< String > columns)
 
String Get (int row, int column)
 
 ChartData ()
 
 ChartData (String[] titles, String[][] data)
 
int Height ()
 
int Width ()
 
boolean Add (int column, String value)
 
boolean AddColumn (String title)
 
String toString ()
 

Static Public Member Functions

static void main (String[] args)
 

Protected Attributes

ArrayList< ArrayList< String > > m_Data
 
ArrayList< String > m_Columns
 
final boolean m_Error = true
 

Constructor & Destructor Documentation

ChartData.ChartData ( )
inline

Basic constructor

Returns
- new empty ChartData
ChartData.ChartData ( String[]  titles,
String  data[][] 
)
inline

Constructor from 2 arrays

Parameters
titles- array of Strings storing column titles
data- array of Strings storing row column specific data
Returns
- new ChartData storing specified data

Member Function Documentation

boolean ChartData.Add ( int  column,
String  value 
)
inline

Adds a value to end of specified column

Parameters
column- the column number to add data to
value- the data to add
Returns
- success
boolean ChartData.AddColumn ( String  title)
inline

Adds a new column to the end of the column list

Parameters
title- title of the new column to be added
Returns
- success
String ChartData.Get ( int  row,
int  column 
)
inline

Accessor for row column specific data

Parameters
column- the column number to retreive data from
row- the row number to retreive data from
Returns
- value stored at [row][column]; null for failure
String ChartData.GetColumn ( int  column)
inline

Accessor for m_Columns - column data

Parameters
column- the column number to retreive data from
Returns
- title of the specified column; null for failure
int ChartData.Height ( )
inline

Calculates height of data - number of rows

Returns
- height of data
static void ChartData.main ( String[]  args)
inlinestatic

Unit test

Parameters
args- command line arguments; not used
boolean ChartData.SetColumns ( ArrayList< String >  columns)
inline

Mutator for m_Columns - column data

Parameters
columns- string arraylist containing column names
Returns
- success
String ChartData.toString ( )
inline

Converts data into a string to be printed to screen

Returns
- string representation of ChartData
int ChartData.Width ( )
inline

Calculates width of data = number of columns

Returns
- width of data

The documentation for this class was generated from the following file: