Examples of nextLong()


Examples of java.util.Random.nextLong()

        s.myFloat = new Float(rand.nextFloat());
        s.myDouble = new Double(rand.nextDouble());
        s.myBigDecimal = new BigDecimal(rand.nextDouble());
        s.myString = Long.toHexString(rand.nextLong());
        s.myUtilDate = new java.util.Date(rand.nextLong());
        s.mySqlDate = new java.sql.Date(rand.nextLong());
        s.mySqlTime = new java.sql.Time(rand.nextLong());
        s.mySqlTimestamp = new java.sql.Timestamp(rand.nextLong());
        return s;
    }
View Full Code Here

Examples of java.util.Random.nextLong()

        s.myDouble = new Double(rand.nextDouble());
        s.myBigDecimal = new BigDecimal(rand.nextDouble());
        s.myString = Long.toHexString(rand.nextLong());
        s.myUtilDate = new java.util.Date(rand.nextLong());
        s.mySqlDate = new java.sql.Date(rand.nextLong());
        s.mySqlTime = new java.sql.Time(rand.nextLong());
        s.mySqlTimestamp = new java.sql.Timestamp(rand.nextLong());
        return s;
    }

    public boolean equivalentTo(SupportedTypes s) {
View Full Code Here

Examples of java.util.Random.nextLong()

        s.myBigDecimal = new BigDecimal(rand.nextDouble());
        s.myString = Long.toHexString(rand.nextLong());
        s.myUtilDate = new java.util.Date(rand.nextLong());
        s.mySqlDate = new java.sql.Date(rand.nextLong());
        s.mySqlTime = new java.sql.Time(rand.nextLong());
        s.mySqlTimestamp = new java.sql.Timestamp(rand.nextLong());
        return s;
    }

    public boolean equivalentTo(SupportedTypes s) {
        boolean same = true;
View Full Code Here

Examples of java.util.Random.nextLong()

        add(1);
        add(-1);
        Random random = new Random(1);
        for (int i = 0; i < 40; i++) {
            if (maxValue > Integer.MAX_VALUE) {
                add(random.nextLong());
            } else {
                add((random.nextBoolean() ? 1 : -1) * random.nextInt((int) maxValue));
            }
        }
        for (Value va : values) {
View Full Code Here

Examples of java.util.Random.nextLong()

    }

    public static synchronized long genGUID() {
        Random rnd = new Random();

        return rnd.nextLong();
    }

    /**
     * lock a directory such as archive dir
     *
 
View Full Code Here

Examples of java.util.Random.nextLong()

        IntHash<Long> hash = new IntHash<Long>();
        Random random = new Random(System.currentTimeMillis());
        for(int i = 0; i < 100000; i++) {
            int key = random.nextInt();
            keys.add(key);
            long value = random.nextLong();
            hash.put(key, value);
        }
        IntHash<Long> copyed = ObjectUtils.deepCopy(hash);
        assert (hash.size() == copyed.size());
        for(int i = 0; i < 100000; i++) {
View Full Code Here

Examples of java.util.Random.nextLong()

        LongHash<Long> hash = new LongHash<Long>();
        Random random = new Random(System.currentTimeMillis());
        for(int i = 0; i < 100000; i++) {
            int key = random.nextInt();
            keys[i] = key;
            long value = random.nextLong();
            hash.put(key, value);
        }
        LongHash<Long> copyed = ObjectUtils.deepCopy(hash);
        assert (hash.size() == copyed.size());
        for(int i = 0; i < 100000; i++) {
View Full Code Here

Examples of java.util.Random.nextLong()

    public void testIterator() {
        long[] values = new long[100000];
        LongHash<Long> hash = new LongHash<Long>();
        Random random = new Random(System.currentTimeMillis());
        for(int i = 0; i < 100000; i++) {
            long v = random.nextLong();
            values[i] = v;
            hash.put(i, v);
        }

        long[] nvalues = new long[100000];
View Full Code Here

Examples of java.util.Random.nextLong()

  {
    Random random = new Random(0L);

    byte[] data = new byte[8];
    for (int i = 0; i < valueCount; i++) {
      ByteArrayUtil.putLong(random.nextLong(), data, 0);
      btree.insert(data);
    }
  }

  private void update(long startValue, long increment, int valueCount, long updateDelta)
View Full Code Here

Examples of java.util.Random.nextLong()

  testLong(1);
  testLong(Long.MIN_VALUE);
  testLong(Long.MAX_VALUE);
  Random rand = new Random();
  for (int i = 0; i < 1000; i++) {
      testLong(rand.nextLong());
  }
    }

    public void testLong(long v) throws Exception {
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.