JavaGrinders
Class StrVariable

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.StrVariable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Direct Known Subclasses:
CharVariable, StringVariable

public class StrVariable
extends Variable

handles a variable of Strings. It sets or retrieves individual entries, and selects rows by comparing the entry to a given String.

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
StrVariable(java.lang.String varName, VariableOrganizer theOwner)
          Standard constructor for the root string Variable class using a VariableOrganizer
 
Method Summary
 Variable cloneSelectedRowsOnly()
          returns a NumberVariable with only the selected rows
 void fillWithParser(DataFileParser aParser, int varNum, boolean firstRowAsLabels)
          fills the variable with individual datavalues read from a textfile using a DataFileParser object
 void selectRows(java.lang.String matchString, boolean fromPrevSelected)
          select all rows with a String that matches the one provided
 
Methods inherited from class JavaGrinders.Variable
addValue, append, appendVariable, asJAMAMatrix, asVariableOrganizer, checkMatchingRows, checkMinUseRows, checkNumberIDs, checkSameIDs, checkSameSelectRows, checkSameSelectRows, checkSameUseRows, checkSameUseRows, checkValidRowRange, clone, 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

StrVariable

public StrVariable(java.lang.String varName,
                   VariableOrganizer theOwner)
            throws java.lang.Exception
Standard constructor for the root string Variable class using a VariableOrganizer

Parameters:
varName - assigns a name 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

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

cloneSelectedRowsOnly

public Variable cloneSelectedRowsOnly()
                               throws java.lang.Exception
returns a NumberVariable with only the selected rows

Overrides:
cloneSelectedRowsOnly in class Variable
Throws:
java.lang.Exception

selectRows

public void selectRows(java.lang.String matchString,
                       boolean fromPrevSelected)
                throws java.lang.Exception
select all rows with a String that matches the one provided

Parameters:
matchString - lists the String to compare with
fromPrevSelected - notes whether the search should only be performed on currently selected rows
Throws:
java.lang.Exception