Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int compareTo(Track other)
- {
- if (this.min > other.min ) return 1;
- if (this.min < other.min ) return -1;
- if (this.min == other.min )
- {
- if (this.sec < other.sec ) return -1;
- if (this.sec > other.sec ) return 1;
- else return 0;
- }
- return 0;
- }
- public String getArtist()
- {
- return artist;
- }
- public String getSongName()
- {
- return songName;
- }
- //public int compareTo(Track other)
- //{
- // if (this.getArtist < other.getArtist) return 1;
- //if (this.getArtist > other.getArtist) return -1;
- // return this.getSongName().compareTo(other.getSongName());
- //}
- }
Add Comment
Please, Sign In to add comment