com.a06.model
Class StoreData

java.lang.Object
  extended by com.a06.model.StoreData

public class StoreData
extends java.lang.Object

Stores pre-formatted user schedules in order to support persistence.


Constructor Summary
StoreData(java.util.ArrayList<java.lang.String> userList)
           
 
Method Summary
static void add(java.lang.String newstring)
           
static void clear()
          Clears all of the stored data
static java.lang.String get(int i)
           
static java.util.ArrayList<java.lang.String> getBusy()
           
static java.lang.String[] getList()
           
static java.lang.String getSBnames()
           
static boolean isEmpty()
           
static java.util.ArrayList<java.lang.String> ProcessData(java.lang.String newSched)
          Stores a new user schedule, or replaces the existing user schedule if applicable.
static int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreData

public StoreData(java.util.ArrayList<java.lang.String> userList)
Parameters:
userList - an ArrayList of preformatted Strings containing the availability of each user
Method Detail

getSBnames

public static java.lang.String getSBnames()
Returns:
The names of each user for each schedule

isEmpty

public static boolean isEmpty()
Returns:
TRUE if no user schedules are stored, FALSE otherwise

size

public static int size()
Returns:
The number of user schedules stored

add

public static void add(java.lang.String newstring)
Parameters:
newstring - a pre-formatted String to be stored

clear

public static void clear()
Clears all of the stored data


get

public static java.lang.String get(int i)
Parameters:
i - the index of the user to be returned
Returns:
The String corresponding to the supplied index

getList

public static java.lang.String[] getList()
Returns:
A String array of schedules for all users

getBusy

public static java.util.ArrayList<java.lang.String> getBusy()
Returns:
A String array of busy times for all users

ProcessData

public static java.util.ArrayList<java.lang.String> ProcessData(java.lang.String newSched)
Stores a new user schedule, or replaces the existing user schedule if applicable.

Parameters:
newSched - a preformatted String containing the new user schedule
Returns:
An ArrayList of Strings containing schedules for all users, including the new addition