Class FunctionPropertyAdapter<T>

  • Type Parameters:
    T - the class of the property value
    All Implemented Interfaces:
    PropertyAdapter<T>

    public class FunctionPropertyAdapter<T>
    extends java.lang.Object
    implements PropertyAdapter<T>
    A property adapter based on functions (or method references).
    See Also:
    TableSummary, TableSummaryPanel
    • Constructor Summary

      Constructors 
      Constructor Description
      FunctionPropertyAdapter​(java.lang.String name, java.lang.String label, java.util.function.Supplier<T> getter, java.util.function.Supplier<java.text.Format> formatFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.text.Format getFormat()  
      java.lang.String getLabel()  
      java.lang.String getName()  
      T getValue()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FunctionPropertyAdapter

        public FunctionPropertyAdapter​(java.lang.String name,
                                       java.lang.String label,
                                       java.util.function.Supplier<T> getter,
                                       java.util.function.Supplier<java.text.Format> formatFactory)
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface PropertyAdapter<T>
        Returns:
        the property name used in PropertyChangeEvents.
      • getLabel

        public java.lang.String getLabel()
        Specified by:
        getLabel in interface PropertyAdapter<T>
        Returns:
        the label for the UI element.
      • getFormat

        public java.text.Format getFormat()
        Specified by:
        getFormat in interface PropertyAdapter<T>
        Returns:
        a formatter for converting the value to a String.