Class ArrayCellText

    • Constructor Detail

      • ArrayCellText

        public ArrayCellText​(T instance,
                             Function<T,​String> lazyText,
                             ArrayLine line)
        The text of the cell is computed from a Function applied to the given instance parameter.
        The function takes in input the given instance and the result must be a String.
        The advantage of this way of use is that the text is computed only when the line is displayed. So that can be see as a lazy computation.
        Once the text computation is done, it is cached so that the computation is performed at most one time.
        Parameters:
        instance - the instance in input of the function.
        lazyText - the function to apply to the instance.
        line - the line of the array.