Interface MappingTableCell<T,E>

Type Parameters:
T - the type of items in the table
E - the type of value extracted by the cell from an item of type T
All Superinterfaces:
Cell<T>, TableCell<T>
All Known Implementing Classes:
SimpleTableCell, UpdatingTableCell

public interface MappingTableCell<T,E> extends TableCell<T>
Whilst TableCell defines the basic API for cells used by VirtualTable, this is probably the most useful type of cell.

This extension specifies additional APIs to extract a certain value E from the table's items of type T (each column represents a certain value E of a given item T), as well as a way to convert the extracted values E to a string.
  • Method Details

    • getExtractor

      Function<T,E> getExtractor()
      Returns:
      the function used to extract a property E from an item T
    • setExtractor

      void setExtractor(Function<T,E> extractor)
      Sets the function used to extract a property E from an item T
    • getConverter

      StringConverter<E> getConverter()
      Returns:
      the StringConverter used to convert an extracted value E to a string
    • setConverter

      void setConverter(StringConverter<E> converter)
      Sets the StringConverter used to convert an extracted value E to a string
    • setConverter

      default void setConverter(Function<E,String> converter)
      Allows to easily set a StringConverter for the cell by just giving a Function as parameter, makes use of FunctionalStringConverter.to(Function).