public Random getNewRandomInstance ( long seed ) { try { Random t = ( Random ) randomClass . newInstance ( ) ; if ( t . getStatePointer ( ) != null ) { // TODO: attach this thing to deallocator // if it's stateless random - we just don't care then } t . setSeed ( seed ) ; return t ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
This method returns new onject implementing Random interface initialized with seed value