public Resource plus ( Resource other ) { double totalCpu = this . getCpu ( ) + other . getCpu ( ) ; ByteAmount totalRam = this . getRam ( ) . plus ( other . getRam ( ) ) ; ByteAmount totalDisk = this . getDisk ( ) . plus ( other . getDisk ( ) ) ; return new Resource ( totalCpu , totalRam , totalDisk ) ; }
Adds a given resource from the current resource .