* Appends a chunk to the group when it is not already a member. * @param {Chunk} chunk chunk being pushed into ChunkGroupS * @returns {boolean} returns true if chunk addition was successful.
(chunk)
| 242 | * @returns {boolean} returns true if chunk addition was successful. |
| 243 | */ |
| 244 | pushChunk(chunk) { |
| 245 | const oldIdx = this.chunks.indexOf(chunk); |
| 246 | if (oldIdx >= 0) { |
| 247 | return false; |
| 248 | } |
| 249 | this.chunks.push(chunk); |
| 250 | return true; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * Replaces one member chunk with another while preserving the group's |
no test coverage detected