Data Class
Constructor
Data
-
columns
Parameters:
-
columns
DataVariable
Item Index
Methods
- find static
- init
- initializeColumns
Methods
find
-
attrName
-
attrValue
-
columns
Searches through a jermaine attr_list of DataVariables (columns) for an entry having a given id or column number.
Parameters:
-
attrName
StringThe name of the attribute to search on; should be either "id" or "column".
-
attrValue
String | IntegerThe value to search for. If attrName is "id", this value should be a string. If attrName is "column", this value should be an int.
-
columns
DataVariable Attr_ListThe attr_list to search through.
Returns:
The index (an int) of the DataVariable entry having the given attribute value, if any, or -1 if none was found
Example:
find("id", "x", columns)
finds the index of the DataVariable in the columns attr_list
having an id of "x"
find("column", 1, columns)
finds the index of the DataVariable in the columns attr_list
having a "column" attribute of 1
init
()
Initialization function --- should be called from isBuiltWith initializer. This is split off into a separate function so that it can be called from submodel's isBuiltWith initializers as well, since Jermaine does not provide a way to call the parent models' isBuiltWith initializer function.
initializeColumns
()
Set the data
attribute of each of this data object's columns
to point to the data object itself.