fixed some code violations

* use new Date(date.getTime()) instead of 'date = date2' and 'return date'
* made max, min and numberOfDecimals in the NumberCriterias private
* Hide default constructor of RandomGenerator as it only has static methods