sbr.items
Class ItemString

java.lang.Object
  extended by sbr.items.ItemString

public class ItemString
extends java.lang.Object

Methods to convert a survey item into the string array format used to hold this information for storage in a file or to be used to create the the survey web page later. This item is then added to the larger string array that holds all of the items for the survey.

Version:
0.5
Author:
John H. Krantz, Ph.D.

Constructor Summary
ItemString()
           
 
Method Summary
 java.lang.String[][][] addItem(java.lang.String[][][] curItems, int type, java.lang.String[][] item)
          Add an item to the string array that holds all items for a survey.
 java.lang.String[][][] delItem(java.lang.String[][][] curItems, int delItem)
          Delete an item from the current list of questions
 java.lang.String[][][] insertItem(java.lang.String[][][] curItems, int pos, java.lang.String[][] newItem)
          Delete an item from the current list of questions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemString

public ItemString()
Method Detail

addItem

public java.lang.String[][][] addItem(java.lang.String[][][] curItems,
                                      int type,
                                      java.lang.String[][] item)
Add an item to the string array that holds all items for a survey.

Parameters:
curItems - The string array that holds all items that are currently in the survey.
type - The type of the new item to be added.
item - The information about the current item to be added to the string array.
Returns:
String [][][] items. This is the expanded string array of all the items in the survey at this point.

delItem

public java.lang.String[][][] delItem(java.lang.String[][][] curItems,
                                      int delItem)
Delete an item from the current list of questions

Parameters:
String - [][] curItems array of items
int - delItem the index of the item to be deleted
Returns:
String [][][] the edited list

insertItem

public java.lang.String[][][] insertItem(java.lang.String[][][] curItems,
                                         int pos,
                                         java.lang.String[][] newItem)
Delete an item from the current list of questions

Parameters:
String - [][] curItems array of items
int - delItem the index of the item to be deleted
Returns:
String [][][] the edited list