@ Override public ByteAmount plus ( ResourceMeasure < Long > other ) { checkArgument ( Long . MAX_VALUE - value >= other . value , String . format ( "Adding %s to %s would exceed Long.MAX_LONG" , other , this ) ) ; return ByteAmount . fromBytes ( value + other . value ) ; }
Adds other to this .