JavaGrinders.spatial
Class TimeVariable

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by JavaGrinders.Variable
                  extended by JavaGrinders.spatial.TimeVariable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class TimeVariable
extends Variable

handles a variable of Strings. It uses the general implementations from the more generic StrVariable class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class JavaGrinders.Variable
allData, autoExtracted, df, itsDescriptives, itsHighlitedColor, itsLineColor, itsLocationColor, rand
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TimeVariable(java.lang.String varName, VariableOrganizer theOwner)
          Standard constructor for the stringVariable class using a VariableOrganizer
 
Method Summary
 void fillWithMilliSecondsVariable(IntegerVariable theMilliSecs)
          fills the variable with individual datavalues read from a textfile using a DataFileParser object
 void fillWithParser_mSecs(DataFileParser aParser, int varNum, boolean firstRowAsLabels)
          fills the variable with individual datavalues read from a textfile using a DataFileParser object
 void fillWithParser(DataFileParser aParser, int varNum, boolean firstRowAsLabels)
          fills the variable with individual datavalues read from a textfile using a DataFileParser object
 void fillWithParser(DataFileParser aParser, int varNum, boolean firstRowAsLabels, java.lang.String dateFormatStr)
          fills the variable with individual datavalues read from a textfile using a DataFileParser object
 void fillWithVariable(IntegerVariable aVar)
          fills the variable as a clone of the variable
 java.util.Date getDateValue(int row)
          returns the time stored at a given row of the Vector as a String
 long getMilliSecondsValue(int row)
          returns the time stored at a given row of the Vector in milliseconds
 long getSecondsValue(int row)
          returns the time stored at a given row of the Vector in seconds
 IntegerVariable getSecondsVariable()
          returns the variable with time in seconds
 
Methods inherited from class JavaGrinders.Variable
addValue, append, appendVariable, asJAMAMatrix, asVariableOrganizer, checkMatchingRows, checkMinUseRows, checkNumberIDs, checkSameIDs, checkSameSelectRows, checkSameSelectRows, checkSameUseRows, checkSameUseRows, checkValidRowRange, clone, cloneSelectedRowsOnly, cloneVariableFrom, combineSelectedWithSavedSelectedRows, copyDescriptives, copySelectStateFrom, customColorSelectedRows, deleteAllRows, deleteDuplicateRows, deleteMissingRows, deleteNonSelectedRows, deleteRow, deleteSelectedRows, deselectAllRows, fill, fill, fill, fill, fill, fill, fillDescriptives, fillDescriptives, fillIDs, fillWithParser, fillWithVariable, findFirstValidRow, findLastValidRow, findNextNonMissingRow, findNextValidRow, findNextValue, findPreviousValidRow, getabasedintValue, getAbasedintValue, getArray, getbooleanValue, getcharValue, getCombinedIDs, getCrossTabulation, getCrossTabulation, getCustomColorRow, getDescriptives, getdoubleArray, getdoubleValue, getfloatValue, getFrequencies, getHighliteColor, getHighlitedRow, getIDMap, getIDs, getIDString, getIDStrings, getInteractions, getintValue, getJaccard, getLineColor, getLocationColor, getlongValue, getManhattan, getMissingRow, getName, getNIDs, getNMissingRows, getNotes, getNRows, getNSelectRows, getNUseRows, getNValidRows, getOrganizer, getProximity, getProximity, getRandomValue, getRowOrder, getRowOrderRow, getSelectRow, getSquEuclidian, getStringArray, getStringValue, getTransitions, getUseRow, getValue, getVariableDesignRole, getVariableDesignRoleString, getVariableFormat, getVariableType, highliteSelectedRows, highliteSelectedRows, invalidDescriptives, invertSelectedRows, isAngleType, isContinuousType, isLocationType, isLocked, isNominalType, isOrdinalType, isXVariable, isYVariable, listDescriptives, listDescriptives, listGroupDescriptives, listGroupDescriptivesNoDia, listRowOrder, listRows, listRows, listRows, listSelectedRows, listSelectState, listSelectState, listUseRows, makeNewDescriptives, makeTableSubSet, matchedIDs, replaceSelectedRows, restoreSelectedRows, restrictToMatchingUseRows, restrictToMatchingUseRows, restrictToValidRowsOnly, reverseRows, saveSelectedRows, selectAllRows, selectDuplicateRows, selectRows, selectUseRows, selectValue, setAnglesType, setCustomColorRow, setFormula, setHighliteColor, setHighlitedRow, setLineColor, setLocationColor, setLocationsType, setLock, setMissingRow, setName, setNominalType, setNotes, setNRows, setOrdinalType, setOrganizer, setRowOrder, setRowOrderRow, setSelectRow, setSelectRows, setSelectRowsToMissing, setValue, setValue, setValue, setValue, setValue, setValue, setVariableDesignRole, setVariableFormat, setVariableType, sort, sort, sort2, updateRowOrder
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

TimeVariable

public TimeVariable(java.lang.String varName,
                    VariableOrganizer theOwner)
             throws java.lang.Exception
Standard constructor for the stringVariable class using a VariableOrganizer

Parameters:
varName - assigns a name (String) to the variable
theOwner - an instance of VariableOrganizer class coordinates a set of variables with respect to number of data points available and the rows that are currently selected
Throws:
java.lang.Exception
Method Detail

fillWithVariable

public void fillWithVariable(IntegerVariable aVar)
fills the variable as a clone of the variable

Parameters:
aVar - the variable to clone

fillWithParser

public void fillWithParser(DataFileParser aParser,
                           int varNum,
                           boolean firstRowAsLabels)
                    throws java.lang.Exception
fills the variable with individual datavalues read from a textfile using a DataFileParser object

Overrides:
fillWithParser in class Variable
Parameters:
aParser - the DataFileParser that was used to read data values from a text file
varNum - marks the number of the column to be filled into the variable
firstRowAsLabels - whether the first row contains a variable label
Throws:
java.lang.Exception

fillWithParser

public void fillWithParser(DataFileParser aParser,
                           int varNum,
                           boolean firstRowAsLabels,
                           java.lang.String dateFormatStr)
                    throws java.lang.Exception
fills the variable with individual datavalues read from a textfile using a DataFileParser object

Parameters:
aParser - the DataFileParser that was used to read data values from a text file
varNum - marks the number of the column to be filled into the variable
firstRowAsLabels - whether the first row contains a variable label
Throws:
java.lang.Exception

fillWithParser_mSecs

public void fillWithParser_mSecs(DataFileParser aParser,
                                 int varNum,
                                 boolean firstRowAsLabels)
                          throws java.lang.Exception
fills the variable with individual datavalues read from a textfile using a DataFileParser object

Parameters:
aParser - the DataFileParser that was used to read data values from a text file
varNum - marks the number of the column to be filled into the variable
firstRowAsLabels - whether the first row contains a variable label
Throws:
java.lang.Exception

fillWithMilliSecondsVariable

public void fillWithMilliSecondsVariable(IntegerVariable theMilliSecs)
                                  throws java.lang.Exception
fills the variable with individual datavalues read from a textfile using a DataFileParser object

Parameters:
theMilliSecs - the time defined by the number of milliseconds since midnight
Throws:
java.lang.Exception

getDateValue

public java.util.Date getDateValue(int row)
                            throws java.lang.Exception
returns the time stored at a given row of the Vector as a String

Parameters:
row - marks the row in the vector
Throws:
java.lang.Exception

getMilliSecondsValue

public long getMilliSecondsValue(int row)
                          throws java.lang.Exception
returns the time stored at a given row of the Vector in milliseconds

Parameters:
row - marks the row in the vector
Throws:
java.lang.Exception

getSecondsValue

public long getSecondsValue(int row)
                     throws java.lang.Exception
returns the time stored at a given row of the Vector in seconds

Parameters:
row - marks the row in the vector
Throws:
java.lang.Exception

getSecondsVariable

public IntegerVariable getSecondsVariable()
                                   throws java.lang.Exception
returns the variable with time in seconds

Throws:
java.lang.Exception