src/main/java/org/intellimate/izou/sdk/frameworks/music/events/PlayerUpdate.java
public static Optional<PlayerUpdate> createPlayerUpdate(Identification source, Volume volume) {
        if (volume == null)
            return Optional.empty();
        try {
            PlayerUpdate playerUpdate = new PlayerUpdate(source);
            playerUpdate.addResource(new VolumeResource(source, volume));
            return Optional.of(playerUpdate);
        } catch (IllegalArgumentException e) {
            return Optional.empty();
        }
    }
public static Optional<PlayerUpdate> createPlayerUpdate(Identification source, Volume volume) {
        if (volume == null)
            return Optional.empty();
        try {
            PlayerUpdate playerUpdate = new PlayerUpdate(source);
            playerUpdate.addResource(new VolumeResource(source, volume));
            return Optional.of(playerUpdate);
        } catch (IllegalArgumentException e) {
            return Optional.empty();
        }
    }
public static Optional < PlayerUpdate > createPlayerUpdate ( Identification source , Volume volume ) { if ( volume == null ) return Optional . empty ( ) ; try { PlayerUpdate playerUpdate = new PlayerUpdate ( source ) ; playerUpdate . addResource ( new VolumeResource ( source , volume ) ) ; return Optional . of ( playerUpdate ) ; } catch ( IllegalArgumentException e ) { return Optional . empty ( ) ; } }
Creates a new Event Object

@param source      the source of the Event, most likely a this reference.
@param volume the current volume, not null
@return the optional PlayerUpdate (if no illegal arguments got passed)
@throws IllegalArgumentException if one of the Arguments is null or empty
Creates a new Event Object