Class SlotReference


  • public class SlotReference
    extends Object
    Uniquely identifies a media slot on the network from which tracks can be loaded, by the player and slot type. A simple immutable value class, with the property that all instances are interned, such that any instances with the same value will actually be the same object, for fast comparison.
    Author:
    James Elliott
    • Field Detail

      • player

        public final int player
        The player in which this slot is found.
    • Method Detail

      • getSlotReference

        public static SlotReference getSlotReference​(int player,
                                                     CdjStatus.TrackSourceSlot slot)
        Get a unique reference to a media slot on the network from which tracks can be loaded.
        Parameters:
        player - the player in which the slot is found
        slot - the specific type of the slot
        Returns:
        the instance that will always represent the specified slot
        Throws:
        NullPointerException - if slot is null
      • getSlotReference

        public static SlotReference getSlotReference​(DataReference dataReference)
        Get a unique reference to the media slot on the network from which the specified data was loaded.
        Parameters:
        dataReference - the data whose media slot is of interest
        Returns:
        the instance that will always represent the slot associated with the specified data