Row, Column, StringColumn
Row, Column, StringColumn
Row Class
The Row
class represents a single row of data in a table.
Methods
getString(columnName: String): String
- Returns a string value from the specified column.
getString(columnIndex: Integer): String
- Returns a string value from the column at the specified index.
rowHash(): Integer
- Returns a hash value for the row.
toString(): String
- Converts the row to a string.
Column Class
The Column
class represents a single column of data in a table.
Methods
title(): String
- Returns the title or name of the column.
name(): String
- Returns the name of the column.
size(): Integer
- Returns the number of items in the column.get(rowIndex: Integer): any
- Returns the data value at the specified row index.isEmpty(): Boolean
- Checks if the column is empty.
print(): String
- Converts the column to a string for printing.'contains(object: any): Boolean
- Checks if the column contains a specific object.type(): any
- Returns the data type of the column.sortAscending()
- Sorts the column in ascending order.
sortDescending()
- Sorts the column in descending order.
StringColumn Class
The StringColumn
class represents a column of string values and provides various methods for string-specific operations.
Methods
equalToIgnoringCase(str: String): Selection
equalToIgnoringCase(str: String): Selection
This method is used to filter the selection based on a case-insensitive comparison with the provided string (str
). It selects rows in which the values in the column match the specified string while ignoring case differences.
startsWith(str: String): Selection
startsWith(str: String): Selection
The startsWith
method is used to filter the selection, returning rows where the values in the column start with the provided string (str
).
endsWith(str: String): Selection
endsWith(str: String): Selection
This method is employed to filter the selection, returning rows where the values in the column end with the specified string (str
).
contains(str: String): Selection
contains(str: String): Selection
The contains
method filters the selection to include rows where the column values contain the given string (str
).
matchesRegex(str: String): Selection
matchesRegex(str: String): Selection
This method allows you to filter the selection using a regular expression. It selects rows where the column values match the provided regular expression string (str
).
isEmpty(): Selection
isEmpty(): Selection
The isEmpty
method is used to filter the selection to include rows where the column values are empty or null.
isAlpha(): Selection
isAlpha(): Selection
This method filters the selection to include rows where the column values consist of alphabetic characters only, excluding digits and special characters.
isNumeric(): Selection
isNumeric(): Selection
The isNumeric
method selects rows where the column values are numeric, consisting of digits and optional decimal points.
isAlphaNumeric(): Selection
isAlphaNumeric(): Selection
This method is used to filter the selection to include rows where the column values contain both alphabetic characters and digits.
isUpperCase(): Selection
isUpperCase(): Selection
The isUpperCase
method selects rows where the column values consist of uppercase letters only.
isLowerCase(): Selection
isLowerCase(): Selection
This method is used to filter the selection to include rows where the column values consist of lowercase letters only.
hasLengthEqualTo(lengthChars: Integer): Selection
hasLengthEqualTo(lengthChars: Integer): Selection
The hasLengthEqualTo
method filters the selection to include rows where the column values have a length equal to the specified lengthChars
.
hasLengthLessThan(lengthChars: Integer): Selection
hasLengthLessThan(lengthChars: Integer): Selection
This method selects rows where the length of the column values is less than the specified lengthChars
.
hasLengthGreaterThan(lengthChars: Integer): Selection
hasLengthGreaterThan(lengthChars: Integer): Selection
The hasLengthGreaterThan
method is used to filter the selection to include rows where the length of the column values is greater than the specified lengthChars
.
These methods provide a variety of ways to filter and manipulate data in a StringColumn
, allowing you to tailor your selections based on specific criteria and conditions.