Class TemporalValueRange<Temporal_ extends Temporal & Comparable<? super Temporal_>>

    • Constructor Detail

      • TemporalValueRange

        public TemporalValueRange​(Temporal_ from,
                                  Temporal_ to,
                                  long incrementUnitAmount,
                                  TemporalUnit incrementUnitType)
        from - never null, inclusive minimum
        to - never null, exclusive maximum, >= from
        incrementUnitAmount - > 0
        incrementUnitType - never null, must be supported by from and to
    • Method Detail

      • getSize

        public long getSize()
        Description copied from interface: CountableValueRange
        Used by uniform random selection in a composite or nullable CountableValueRange.
        the exact number of elements generated by this CountableValueRange, always >= 0
      • contains

        public boolean contains​(Temporal_ value)
        value - sometimes null
        true if the ValueRange contains that value
      • createOriginalIterator

        public Iterator<Temporal_> createOriginalIterator()
        Description copied from interface: CountableValueRange
        Select the elements in original (natural) order.
        never null
      • createRandomIterator

        public Iterator<Temporal_> createRandomIterator​(Random workingRandom)
        Description copied from interface: ValueRange
        Select in random order, but without shuffling the elements. Each element might be selected multiple times. Scales well because it does not require caching.
        workingRandom - never null, the Random to use when any random number is needed, so EnvironmentMode.REPRODUCIBLE works correctly. RandomUtils can be useful too.
        never null