<commit_before>package io.udash.properties.seq

import io.udash.properties.single.{Property, ReadableProperty}

private[properties]
class TransformedReadableSeqProperty[A, B, ElemType <: ReadableProperty[B], OrigType <: ReadableProperty[A]]
                                    (override protected val origin: ReadableSeqProperty[A, OrigType], transformer: A => B)
  extends ForwarderReadableSeqProperty[A, B, ElemType, OrigType] with ForwarderWithLocalCopy[A, B, ElemType, OrigType] {

  private var lastValue: Seq[A] = _
  private var transformedLastValue: Seq[B] = _

  override protected def loadFromOrigin(): Seq[B] = {
    if (origin.size != transformedElements.size || origin.get != lastValue) {
      lastValue = origin.get
      transformedLastValue = lastValue.map(transformer)<commit_msg>Avoid boxing transformedElements on length check.<commit_after>package io.udash.properties.seq

import io.udash.properties.single.{Property, ReadableProperty}

private[properties]
class TransformedReadableSeqProperty[A, B, ElemType <: ReadableProperty[B], OrigType <: ReadableProperty[A]]
                                    (override protected val origin: ReadableSeqProperty[A, OrigType], transformer: A => B)
  extends ForwarderReadableSeqProperty[A, B, ElemType, OrigType] with ForwarderWithLocalCopy[A, B, ElemType, OrigType] {

  private var lastValue: Seq[A] = _
  private var transformedLastValue: Seq[B] = _

  override protected def loadFromOrigin(): Seq[B] = {
    if (origin.size != transformedElements.length || origin.get != lastValue) {
      lastValue = origin.get
      transformedLastValue = lastValue.map(transformer)
{'fraction_non_alphanumeric': 0.10097919216646267, 'fraction_numerical': 0.0, 'mean_word_length': 4.505050505050505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5110339', 'n_tokens_mistral': 487, 'n_tokens_neox': 466, 'n_words': 112}