Package ar.edu.unlp.yaqc4j.exceptions

Examples of ar.edu.unlp.yaqc4j.exceptions.GenerationError


   */
  @Override
  public Integer arbitrary(final Distribution random, final long minsize,
      final long maxsize) {
    if (maxsize < 0){
      throw new GenerationError("Cannot generate positive integers with maxsize = " + maxsize);
    }
    long max = Math.min(maxsize, Long.MAX_VALUE);
    return INT_GEN.arbitrary(random, Math.max(0, minsize), max);
  }
View Full Code Here


      DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
      // df.setLenient(false);
      return df.parse(day + "/" + month + "/" + year);
  } catch (ParseException e) {
      // should not happen
      throw new GenerationError("A wrong date was generated");
  }
    }
View Full Code Here

TOP

Related Classes of ar.edu.unlp.yaqc4j.exceptions.GenerationError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.