2 * Copyright (C) 2012 Andrew Neal Licensed under the Apache License, Version 2.0
3 * (the "License"); you may not use this file except in compliance with the
4 * License. You may obtain a copy of the License at
5 * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
6 * or agreed to in writing, software distributed under the License is
7 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the specific language
9 * governing permissions and limitations under the License.
12 package com.andrew.apollo.model;
14 import android.text.TextUtils;
17 * A class that represents a playlist.
19 * @author Andrew Neal (andrewdneal@gmail.com)
21 public class Playlist {
24 * The unique Id of the playlist
26 public long mPlaylistId;
31 public String mPlaylistName;
34 * Constructor of <code>Genre</code>
36 * @param playlistId The Id of the playlist
37 * @param playlistName The playlist name
39 public Playlist(final long playlistId, final String playlistName) {
41 mPlaylistId = playlistId;
42 mPlaylistName = playlistName;
49 public int hashCode() {
52 result = prime * result + (int) mPlaylistId;
53 result = prime * result + (mPlaylistName == null ? 0 : mPlaylistName.hashCode());
61 public boolean equals(final Object obj) {
68 if (getClass() != obj.getClass()) {
71 final Playlist other = (Playlist)obj;
72 if (mPlaylistId != other.mPlaylistId) {
75 return TextUtils.equals(mPlaylistName, other.mPlaylistName);
82 public String toString() {