

package com.tulskiy.musique.playlist;

import java.io.File;
import java.net.URI;
import java.util.Random;

/**
 * Author: Denis Tulskiy
 * Date: Jun 15, 2010
 */

/**
 * Class used to represent track information
 * <p/>
 * <p><p><strong>Warning: getMeta(key) returns raw value of the variable,
 * getters, eg. getTrackNumber(), may return different values</strong>
 * <p/>
 * <p>I know it's stupid, but that's the way my title formatting works
 */
@SuppressWarnings({"UnusedDeclaration"})
public class Track implements Cloneable {
    private static Random random = new Random();

    private TrackData trackData;
    private int shuffleRating;

    public Track() {
        this(new TrackData());
    }

    public Track(Track track) {
        this(track.trackData);
    }

    public Track(TrackData trackData) {
        this.trackData = trackData;
        shuffleRating = random.nextInt();
    }

    public int getShuffleRating() {
        return shuffleRating;
    }

    public void setShuffleRating(int shuffleRating) {
        this.shuffleRating = shuffleRating;
    }

    public Track copy() {
        return new Track(trackData.copy());
    }

    private int queuePosition = -1;

    public void setQueuePosition(int queuePosition) {
        this.queuePosition = queuePosition;
    }

    public int getQueuePosition() {
        return queuePosition;
    }

    public TrackData getTrackData() {
        return trackData;
    }

    public void setTrackData(TrackData trackData) {
        this.trackData = trackData;
    }

}
