Class ColorItem


  • public class ColorItem
    extends SearchableItem
    Represents a track color label. This is a specialized SearchableItem, since in addition to a specific color, it has an ID and label that can be used as a way to select tracks in a dynamic playlist request, and on which playlists can be sorted. A simple immutable value class.
    Author:
    James Elliott
    • Field Detail

      • color

        public final Color color
        The color that is represented by this item.
      • colorName

        public final String colorName
        The name of the color represented by this item, for textual display.
    • Constructor Detail

      • ColorItem

        public ColorItem​(int id,
                         String label,
                         Color color,
                         String colorName)
        Constructor simply sets the immutable value fields
        Parameters:
        id - the database ID associated with this item, for searches
        label - the text label used to show this item to the user
        color - the color represented by this item
        colorName - the name of the color represented by this item, for textual display