public static Supply add(final int divisibility,final Supply s1,final Supply s2){
  final Supply sum=MosaicUtils.tryAdd(divisibility,s1,s2);
  if (null == sum) {
    final String message=String.format("cannot add %s to %s for mosaic with divisibility %d",s1,s2,divisibility);
    throw new IllegalArgumentException(message);
  }
  return sum;
}

public static Supply add ( final int divisibility , final Supply s1 , final Supply s2 ) { final Supply sum = MosaicUtils . tryAdd ( divisibility , s1 , s2 ) ; if ( null == sum ) { final String message = String . format ( "cannot add %s to %s for mosaic with divisibility %d" , s1 , s2 , divisibility ) ; throw new IllegalArgumentException ( message ) ; } return sum ; }
adds supplies representing assets corresponding to a mosaic with the specified divisibility . throws an exception if the supplies cannot be added .
