Package com.vaadin.ui

Interface IconGenerator<T>

  • Type Parameters:
    T - item type for which the icon is generated
    All Superinterfaces:
    java.util.function.Function<T,​Resource>, java.io.Serializable, SerializableFunction<T,​Resource>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IconGenerator<T>
    extends SerializableFunction<T,​Resource>
    A callback interface for generating icons for an item.
    Since:
    8.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Resource apply​(T item)
      Gets an icon resource for the item.
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Method Detail

      • apply

        Resource apply​(T item)
        Gets an icon resource for the item.
        Specified by:
        apply in interface java.util.function.Function<T,​Resource>
        Parameters:
        item - the item for which to generate an icon for
        Returns:
        the generated icon resource