Class ForkNumberBucket


  • public final class ForkNumberBucket
    extends java.lang.Object
    A bucket from which fork numbers can be drawn. Any drawn number needs to be returned to the bucket, in order to keep the range of provided values delivered as small as possible.
    Author:
    Andreas Gudian
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int drawNumber()  
      static void returnNumber​(int number)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • drawNumber

        public static int drawNumber()
        Returns:
        a fork number that is not currently in use. The value must be returned to the bucket using returnNumber(int).
      • returnNumber

        public static void returnNumber​(int number)
        Parameters:
        number - the number to return to the bucket so that it can be reused.