All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.simplaex.dummies.generators.LocalTimeGenerator Maven / Gradle / Ivy

package com.simplaex.dummies.generators;

import com.simplaex.dummies.Dummies;
import com.simplaex.dummies.Generator;
import lombok.RequiredArgsConstructor;

import java.time.LocalTime;
import java.util.Random;

@RequiredArgsConstructor
public class LocalTimeGenerator implements Generator {

  private final Dummies dummies;

  @Override
  public LocalTime get() {
    final Random random = dummies.getRandom();
    return LocalTime.of(random.nextInt(24), random.nextInt(60), random.nextInt(60));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy