Android Open Source - shareplay Item






From Project

Back to project page shareplay.

License

The source code is released under:

Copyright (c) 2014, Benjamin Damer All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...

If you think the Android project shareplay listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.afqa123.shareplay.data;
/*from w  w  w.j  av a 2  s  . c om*/
import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class Item implements Serializable, Parcelable {

  private static final long serialVersionUID = -209321053886816131L;

  private byte _kind;
  
  private long _id;
  
  private String _name;
  
  private String _artist;
  
  private String _album;
  
  private short _track;
      
  public static final Parcelable.Creator<Item> CREATOR = new Parcelable.Creator<Item>() {
    public Item createFromParcel(Parcel in) {
      return new Item(in);
    }
    
    public Item[] newArray(int size) {
      return new Item[size];
    }
  };

  public Item() {
    
  }
  
  public Item(long id, String name, short track, String album, String artist) {
    _id = id;
    _name = name;
    _artist = artist;
    _album = album;
    _track = track;
  }

  public Item(Parcel in) {
    readFromParcel(in);
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte(_kind);
    dest.writeLong(_id);
    dest.writeString(_name);
    dest.writeInt(_track);
    dest.writeString(_artist);
    dest.writeString(_album);
  }
  
  public void readFromParcel(Parcel in) {
    _kind = in.readByte();
    _id = in.readLong();
    _name = in.readString();
    _track = (short)in.readInt();
    _artist = in.readString();
    _album = in.readString();
  }

  @Override
  public int describeContents() {
    return 0;
  }

  public byte getKind() {
    return _kind;
  }

  public void setKind(byte kind) {
    this._kind = kind;
  }

  public long getId() {
    return _id;
  }

  public void setId(long id) {
    this._id = id;
  }

  public String getName() {
    return _name;
  }

  public void setName(String name) {
    this._name = name;
  }

  public String getArtist() {
    return _artist;
  }

  public void setArtist(String artist) {
    this._artist = artist;
  }

  public String getAlbum() {
    return _album;
  }

  public void setAlbum(String album) {
    this._album = album;
  }

  public short getTrack() {
    return _track;
  }

  public void setTrack(short track) {
    _track = track;
  }

  @Override
  public String toString() {
    return _name + " by " + _artist + " from " + _album;
  }
}




Java Source Code List

com.afqa123.log.DefaultLogger.java
com.afqa123.log.FileLogger.java
com.afqa123.log.LoggerFactory.java
com.afqa123.log.Logger.java
com.afqa123.log.NullLogger.java
com.afqa123.shareplay.DialogFactory.java
com.afqa123.shareplay.MediaPlayerService.java
com.afqa123.shareplay.SelectionActivity.java
com.afqa123.shareplay.SharePlayActivity.java
com.afqa123.shareplay.common.AuthorizationException.java
com.afqa123.shareplay.common.Base64.java
com.afqa123.shareplay.common.Constants.java
com.afqa123.shareplay.common.CustomFeedback.java
com.afqa123.shareplay.common.DAAPException.java
com.afqa123.shareplay.common.DBHelper.java
com.afqa123.shareplay.common.Feedback.java
com.afqa123.shareplay.common.Filename.java
com.afqa123.shareplay.common.ListWrapper.java
com.afqa123.shareplay.common.StoppableThread.java
com.afqa123.shareplay.common.StreamProxy.java
com.afqa123.shareplay.data.ContentCode.java
com.afqa123.shareplay.data.Item.java
com.afqa123.shareplay.data.Playlist.java
com.afqa123.shareplay.impl.Client.java
com.afqa123.shareplay.impl.DatabaseCatalog.java
com.afqa123.shareplay.impl.ServerProvider.java
com.afqa123.shareplay.impl.Server.java
com.afqa123.shareplay.interfaces.Catalog.java
com.afqa123.shareplay.interfaces.IClient.java
com.afqa123.shareplay.interfaces.IServerProvider.java