/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.iZpl;

import java.util.Objects;

/**
 *
 * @author LH
 */
public class SinglePlayListItem implements PlayListItem
{
    private String path,Title;
    private int targetplaycount,countPlayed;

    
    public SinglePlayListItem(){};
    
    public SinglePlayListItem(String path, String Title, int playcount)
    {
        this.path = path;
        this.Title = Title;
        this.targetplaycount = playcount;
        countPlayed=0; //noch nie gespielt als default; bei reload wird anderweitig verglichen :P
    }

    public String getPath()
    {
        return path;
    }

    public void setPath(String path)
    {
        this.path = path;
    }

    public String getTitle()
    {
        return Title;
    }

    public void setTitle(String Title)
    {
        this.Title = Title;
    }

    public int getTargetPlaycount()
    {
        return targetplaycount;
    }



    public void setTargetPlaycount(int playcount)
    {
        this.targetplaycount = playcount;
    }

    public int getCountPlayed()
    {
        return countPlayed;
    }

    public void setCountPlayed(int countPlayed)
    {
        this.countPlayed = countPlayed;
    }
    
    public String getM3UElement()
    {
        return "\n"+Title+"\n"+path;
    }
        @Override
    public int hashCode()
    {
        int hash = 3;
        hash = 23 * hash + Objects.hashCode(this.path);
        hash = 23 * hash + Objects.hashCode(this.Title);
        return hash;
    }

    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
        {
            return false;
        }
        if (getClass() != obj.getClass())
        {
            return false;
        }
        final SinglePlayListItem other = (SinglePlayListItem) obj;
        if (!Objects.equals(this.path, other.path))
        {
            return false;
        }
        if (!Objects.equals(this.Title, other.Title))
        {
            return false;
        }
        return true;
    }
}
