Back to project page Android-Apps.
The source code is released under:
Apache License
If you think the Android project Android-Apps listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kniezrec.xbmcgear.player; //w w w .j a v a 2 s .c o m import com.kniezrec.xbmcgear.connection.GearJSON; import java.util.ArrayList; public class Playlist { private final ArrayList<Song> mSongs = new ArrayList<Song>(); private int mStart; private int mEnd; private int mTotal; private int mCurrent; private int mId; private int mLimitsHash; private int mItemsHash; public boolean areNewLimits(int newHash) { return (mLimitsHash != newHash); } public boolean areNewItems(int newHash) { return (mItemsHash != newHash); } public void setLimitsHash(int limitsHash) { this.mLimitsHash = limitsHash; } public void setItemsHash(int itemsHash) { this.mItemsHash = itemsHash; } public int getId() { return mId; } public void setId(int id) { this.mId = id; } public int getStart() { return mStart; } public void setStart(int start) { this.mStart = start; } public int getEnd() { return mEnd; } public void setEnd(int end) { this.mEnd = end; } public int getTotal() { return mTotal; } public void setTotal(int total) { this.mTotal = total; } public int getCurrent() { return mCurrent; } public void setCurrent(int current) { this.mCurrent = current; } Song getSong(int index) { if (index < mSongs.size()) { return mSongs.get(index); } else return null; } public boolean isListEmpty() { return (mSongs.size() == 0); } public String getJsonSong(int index) { Song s = getSong(index); return GearJSON.getJSONsong(s); } public void addSong(Song song) { this.mSongs.add(song); } public void clearSongs() { this.mSongs.clear(); } public String toString() { return GearJSON.getJSONsongs(mSongs); } }