Package org.deepsymmetry.beatlink.data
Class SlotReference
- java.lang.Object
-
- org.deepsymmetry.beatlink.data.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 Summary
Fields Modifier and Type Field Description int
player
The player in which this slot is found.CdjStatus.TrackSourceSlot
slot
The specific type of the slot.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.static SlotReference
getSlotReference(DataReference dataReference)
Get a unique reference to the media slot on the network from which the specified data was loaded.String
toString()
-
-
-
Field Detail
-
player
public final int player
The player in which this slot is found.
-
slot
public final CdjStatus.TrackSourceSlot slot
The specific type of the slot.
-
-
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 foundslot
- the specific type of the slot- Returns:
- the instance that will always represent the specified slot
- Throws:
NullPointerException
- ifslot
isnull
-
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
-
-