Cell
¶
A single value in a table.
This class cannot be instantiated directly. It is only used for arguments of callbacks.
Type parameters:
Name | Upper Bound | Description | Default |
---|---|---|---|
T |
Any? |
- | Any? |
Stub code in Cell.sdsstub
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
|
dt
¶
Namespace for operations on date time values.
Type: TemporalCell
str
¶
Namespace for operations on strings.
Type: StringCell
abs
¶
Get the absolute value.
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [1, -2]);
val result = column.transform((cell) -> cell.abs());
// Column("example", [1, 2])
}
add
¶
Add a value. This WILL LATER BE equivalent to the +
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.add(3));
// Column("example", [4, 5])
}
and
¶
Perform a boolean AND operation. This WILL LATER BE equivalent to the ^and operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
union<Boolean, Cell<Boolean>> |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [true, false]);
val result = column.transform((cell) -> cell.^and(false));
// Column("example", [false, false])
}
Stub code in Cell.sdsstub
ceil
¶
Round up to the nearest integer.
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [1.1, 2.9]);
val result = column.transform((cell) -> cell.ceil());
// Column("example", [2, 3])
}
div
¶
Divide by a value. This WILL LATER BE equivalent to the /
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [6, 8]);
val result = column.transform((cell) -> cell.div(2));
// Column("example", [3, 4])
}
eq
¶
Check if equal to a value. This WILL LATER BE equivalent to the ==
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.eq(2));
// Column("example", [false, true])
}
floor
¶
Round down to the nearest integer.
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [1.1, 2.9]);
val result = column.transform((cell) -> cell.floor());
// Column("example", [1, 2])
}
ge
¶
Check if greater than or equal to a value. This WILL LATER BE equivalent to the >=
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.ge(2));
// Column("example", [false, true])
}
gt
¶
Check if greater than a value. This WILL LATER BE equivalent to the >
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.gt(2));
// Column("example", [false, false])
}
le
¶
Check if less than or equal to a value. This WILL LATER BE equivalent to the <=
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.le(2));
// Column("example", [true, true])
}
lt
¶
Check if less than a value. This WILL LATER BE equivalent to the <
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [1, 2]);
val result = column.transform((cell) -> cell.lt(2));
// Column("example", [true, false])
}
mod
¶
Perform a modulo operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [5, 6]);
val result = column.transform((cell) -> cell.mod(3));
// Column("example", [2, 0])
}
mul
¶
Multiply by a value. This WILL LATER BE equivalent to the *
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [2, 3]);
val result = column.transform((cell) -> cell.mul(4));
// Column("example", [8, 12])
}
neg
¶
Negate the value.
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [1, -2]);
val result = column.transform((cell) -> cell.neg());
// Column("example", [-1, 2])
}
not
¶
Negate a boolean. This WILL LATER BE equivalent to the ^not operator.
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [true, false]);
val result = column.transform((cell) -> cell.^not());
// Column("example", [false, true])
}
or
¶
Perform a boolean OR operation. This WILL LATER BE equivalent to the ^or operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
union<Boolean, Cell<Boolean>> |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [true, false]);
val result = column.transform((cell) -> cell.^or(true));
// Column("example", [true, true])
}
Stub code in Cell.sdsstub
pow
¶
Raise to a power.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
union<Cell<Any?>, Float> |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [2, 3]);
val result = column.transform((cell) -> cell.pow(3.0));
// Column("example", [8, 27])
}
sub
¶
Subtract a value. This WILL LATER BE equivalent to the -
operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Any |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Any?> |
- |
Examples:
pipeline example {
val column = Column("example", [5, 6]);
val result = column.transform((cell) -> cell.^sub(3));
// Column("example", [2, 3])
}
xor
¶
Perform a boolean XOR operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
union<Boolean, Cell<Boolean>> |
- | - |
Results:
Name | Type | Description |
---|---|---|
result |
Cell<Boolean> |
- |
Examples:
pipeline example {
val column = Column("example", [true, false]);
val result = column.transform((cell) -> cell.xor(true));
// Column("example", [false, true])
}
Stub code in Cell.sdsstub
firstNotNone
¶
Return the first cell from the given list that is not None.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cells |
List<Cell<Any?>> |
The list of cells to be searched. | - |
Results:
Name | Type | Description |
---|---|---|
cell |
Cell<Any?> |
Returns the contents of the first cell that is not None. If all cells in the list are None or the list is empty returns None. |