src/main/java/org/intellimate/izou/sdk/frameworks/music/player/TrackInfo.java
public Optional<TrackInfo> update(String name, String artist, String album, byte[] albumCover, String coverFormat, String data, String year, String genre, String bmp, long duration) {
        if (isNew(name, artist, album, albumCover, albumCoverFormat, data, year, genre, bmp, duration))
            return Optional.empty();
        boolean change = false;
        if (name != null && !name.equals(this.name)) {
            change = true;
        }
        if (artist != null && !artist.equals(this.artist)) {
            change = true;
        }
        if (album != null && !album.equals(this.album)) {
            change = true;
        }
        if (name != null && !name.equals(this.name)) {
            change = true;
        }
        if (albumCoverFormat != null && !albumCoverFormat.equals(this.albumCoverFormat)) {
            change = true;
        }
        if (data != null && !data.equals(this.data)) {
            change = true;
        }
        if (year != null && !year.equals(this.year)) {
            change = true;
        }
        if (genre != null && !genre.equals(this.genre)) {
            change = true;
        }
        if (duration > 0 && duration != this.duration) {
            change = true;
        }
        if (bmp != null && !bmp.equals(this.bmp)) {
            change = true;
        }
        if (!change)
            return Optional.empty();
        return Optional.of(new TrackInfo(
                this.name == null? name : this.name,
                this.artist == null? artist : this.artist,
                this.album == null? album : this.album,
                this.albumCover == null? albumCover : this.albumCover,
                this.albumCoverFormat == null? albumCoverFormat : this.albumCoverFormat,
                this.data == null? data : this.data,
                this.year == null? year : this.year,
                this.genre == null? genre : this.genre,
                this.bmp == null? bmp : this.bmp,
                this.duration < 0 ? duration : this.duration
        ));
    }
public Optional<TrackInfo> update(String name, String artist, String album, byte[] albumCover, String coverFormat, String data, String year, String genre, String bmp, long duration) {
        if (isNew(name, artist, album, albumCover, albumCoverFormat, data, year, genre, bmp, duration))
            return Optional.empty();
        boolean change = false;
        if (name != null && !name.equals(this.name)) {
            change = true;
        }
        if (artist != null && !artist.equals(this.artist)) {
            change = true;
        }
        if (album != null && !album.equals(this.album)) {
            change = true;
        }
        if (name != null && !name.equals(this.name)) {
            change = true;
        }
        if (albumCoverFormat != null && !albumCoverFormat.equals(this.albumCoverFormat)) {
            change = true;
        }
        if (data != null && !data.equals(this.data)) {
            change = true;
        }
        if (year != null && !year.equals(this.year)) {
            change = true;
        }
        if (genre != null && !genre.equals(this.genre)) {
            change = true;
        }
        if (duration > 0 && duration != this.duration) {
            change = true;
        }
        if (bmp != null && !bmp.equals(this.bmp)) {
            change = true;
        }
        if (!change)
            return Optional.empty();
        return Optional.of(new TrackInfo(
                this.name == null? name : this.name,
                this.artist == null? artist : this.artist,
                this.album == null? album : this.album,
                this.albumCover == null? albumCover : this.albumCover,
                this.albumCoverFormat == null? albumCoverFormat : this.albumCoverFormat,
                this.data == null? data : this.data,
                this.year == null? year : this.year,
                this.genre == null? genre : this.genre,
                this.bmp == null? bmp : this.bmp,
                this.duration < 0 ? duration : this.duration
        ));
    }
returns a trackinfo if some information was added and not overwritten (see isNew) AND a change occurred.
@param name the name
@param artist the artist
@param album the album
@param albumCover the album cover
@param coverFormat the album cover format
@param data the data
@param year the year
@param genre the genre
@param duration the duration
@param bmp the bmp
@return a trackInfo if some information was updated, and an empty optional if: 1. information would be ovewritten
or 2. no change occured