Package org.deepsymmetry.beatlink.data
Class DataReference
- java.lang.Object
-
- org.deepsymmetry.beatlink.data.DataReference
-
public class DataReference extends Object
Uniquely identifies a track, album art, beat grid, or waveform currently available on the network, by the player and media slot in which it is mounted, and its rekordbox ID. A simple immutable value class.- Author:
- James Elliott
-
-
Field Summary
Fields Modifier and Type Field Description int
player
The player in which this track, album art, beat grid, or waveform is mounted.int
rekordboxId
The unique ID of the track, album art, beat grid, or waveform within that media database.CdjStatus.TrackSourceSlot
slot
The slot in which the track, album art, beat grid, or waveform is mounted.
-
Constructor Summary
Constructors Constructor Description DataReference(int player, CdjStatus.TrackSourceSlot slot, int rekordboxId)
Create a unique reference to a track, album art, beat grid, or waveform that is currently available on the network.DataReference(SlotReference slot, int rekordboxId)
Create a unique reference to a track, album art, beat grid, or waveform that is currently available on the network.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
SlotReference
getSlotReference()
Extract the slot reference portion of this data reference (discarding the rekordbox ID).int
hashCode()
String
toString()
-
-
-
Field Detail
-
player
public final int player
The player in which this track, album art, beat grid, or waveform is mounted.
-
slot
public final CdjStatus.TrackSourceSlot slot
The slot in which the track, album art, beat grid, or waveform is mounted.
-
rekordboxId
public final int rekordboxId
The unique ID of the track, album art, beat grid, or waveform within that media database.
-
-
Constructor Detail
-
DataReference
public DataReference(int player, CdjStatus.TrackSourceSlot slot, int rekordboxId)
Create a unique reference to a track, album art, beat grid, or waveform that is currently available on the network.- Parameters:
player
- the player in which the item is mountedslot
- the slot in which the item is mountedrekordboxId
- the unique ID of the item within that media database- Throws:
NullPointerException
- ifslot
isnull
-
DataReference
public DataReference(SlotReference slot, int rekordboxId)
Create a unique reference to a track, album art, beat grid, or waveform that is currently available on the network.- Parameters:
slot
- the slot in which the item is mountedrekordboxId
- the unique ID of the item within that media database
-
-
Method Detail
-
getSlotReference
public SlotReference getSlotReference()
Extract the slot reference portion of this data reference (discarding the rekordbox ID).- Returns:
- the player and slot from which this data can to be loaded
-
-