Package com.fasterxml.uuid.impl

Examples of com.fasterxml.uuid.impl.RandomBasedGenerator$LazyRandom


    {
        // this test will attempt to check for reasonable behavior of the
        // generateRandomBasedUUID method
       
        // we need a instance to use
        RandomBasedGenerator uuid_gen = Generators.randomBasedGenerator();
       
        // for the random UUID generator, we will generate a bunch of
        // random UUIDs
        UUID uuid_array[] = new UUID[SIZE_OF_TEST_ARRAY];
       
        // now create the array of uuids
        for (int i = 0; i < uuid_array.length; i++)
        {
            uuid_array[i] = uuid_gen.generate();
        }
       
        // check that none of the UUIDs are null
        checkUUIDArrayForNonNullUUIDs(uuid_array);
       
View Full Code Here


     * Factory method for constructing UUID generator that uses specified
     * random number generator for constructing UUIDs according to standard
     * method number 4.
     */
    public static RandomBasedGenerator randomBasedGenerator(Random rnd) {
        return new RandomBasedGenerator(rnd);
    }
View Full Code Here

        // Whether to include namespace? Depends on whether we compare with JDK (which does not)
//        UUID namespaceForNamed = NAMESPACE;
        UUID namespaceForNamed = null;

        final RandomBasedGenerator secureRandomGen = Generators.randomBasedGenerator();
        final RandomBasedGenerator utilRandomGen = Generators.randomBasedGenerator(new java.util.Random(123));
        final TimeBasedGenerator timeGenPlain = Generators.timeBasedGenerator(nic);
        final TimeBasedGenerator timeGenSynced = Generators.timeBasedGenerator(nic,
                new com.fasterxml.uuid.ext.FileBasedTimestampSynchronizer());
        final StringArgGenerator nameGen = Generators.nameBasedGenerator(namespaceForNamed);
       
View Full Code Here

TOP

Related Classes of com.fasterxml.uuid.impl.RandomBasedGenerator$LazyRandom

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.