test_class.file: common/src/test/java/com/scottlogic/datahelix/generator/common/profile/TimeGranularityTest.java
test_class.identifier: TimeGranularityTest
test_case.body: @Test
      void getPrevious_onGranularity_returnsPreviousTime() {
          TimeGranularity granularity = new TimeGranularity(ChronoUnit.HOURS);
          LocalTime time = LocalTime.of(12, 0, 0);
          LocalTime expected = LocalTime.of(11, 0, 0);
  
          Assert.assertEquals(expected, granularity.getPrevious(time));
      }
test_case.class_method_signature: TimeGranularityTest.getPrevious_onGranularity_returnsPreviousTime()
test_case.full_signature: @Test void getPrevious_onGranularity_returnsPreviousTime()
test_case.identifier: getPrevious_onGranularity_returnsPreviousTime
test_case.invocations: of of assertEquals getPrevious
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void getPrevious_onGranularity_returnsPreviousTime()
focal_class.declarator: DEFAULT = new TimeGranularity(ChronoUnit.MILLIS)
focal_class.modifier: public static final
focal_class.original_string: public static final TimeGranularity DEFAULT = new TimeGranularity(ChronoUnit.MILLIS);
focal_class.type: TimeGranularity
focal_class.var_name: DEFAULT
focal_class.declarator: granularity
focal_class.modifier: private final
focal_class.original_string: private final ChronoUnit granularity;
focal_class.type: ChronoUnit
focal_class.var_name: granularity
focal_class.file: common/src/main/java/com/scottlogic/datahelix/generator/common/profile/TimeGranularity.java
focal_class.identifier: TimeGranularity
focal_class.interfaces: implements Granularity<LocalTime>
focal_class.class_method_signature: TimeGranularity.TimeGranularity(ChronoUnit granularity)
focal_class.full_signature: public  TimeGranularity(ChronoUnit granularity)
focal_class.identifier: TimeGranularity
focal_class.modifiers: public
focal_class.parameters: (ChronoUnit granularity)
focal_class.signature:  TimeGranularity(ChronoUnit granularity)
focal_class.class_method_signature: TimeGranularity.create(String granularity)
focal_class.full_signature: public static TimeGranularity create(String granularity)
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: (String granularity)
focal_class.return: TimeGranularity
focal_class.signature: TimeGranularity create(String granularity)
focal_class.class_method_signature: TimeGranularity.getFinestGranularity()
focal_class.full_signature: @Override public Granularity<LocalTime> getFinestGranularity()
focal_class.identifier: getFinestGranularity
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Granularity<LocalTime>
focal_class.signature: Granularity<LocalTime> getFinestGranularity()
focal_class.class_method_signature: TimeGranularity.isCorrectScale(LocalTime value)
focal_class.full_signature: @Override public boolean isCorrectScale(LocalTime value)
focal_class.identifier: isCorrectScale
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value)
focal_class.return: boolean
focal_class.signature: boolean isCorrectScale(LocalTime value)
focal_class.class_method_signature: TimeGranularity.merge(Granularity<LocalTime> otherGranularity)
focal_class.full_signature: @Override public Granularity<LocalTime> merge(Granularity<LocalTime> otherGranularity)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (Granularity<LocalTime> otherGranularity)
focal_class.return: Granularity<LocalTime>
focal_class.signature: Granularity<LocalTime> merge(Granularity<LocalTime> otherGranularity)
focal_class.class_method_signature: TimeGranularity.getNext(LocalTime value, int amount)
focal_class.full_signature: @Override public LocalTime getNext(LocalTime value, int amount)
focal_class.identifier: getNext
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value, int amount)
focal_class.return: LocalTime
focal_class.signature: LocalTime getNext(LocalTime value, int amount)
focal_class.class_method_signature: TimeGranularity.getNext(LocalTime value)
focal_class.full_signature: @Override public LocalTime getNext(LocalTime value)
focal_class.identifier: getNext
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value)
focal_class.return: LocalTime
focal_class.signature: LocalTime getNext(LocalTime value)
focal_class.class_method_signature: TimeGranularity.getPrevious(LocalTime value, int amount)
focal_class.full_signature: @Override public LocalTime getPrevious(LocalTime value, int amount)
focal_class.identifier: getPrevious
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value, int amount)
focal_class.return: LocalTime
focal_class.signature: LocalTime getPrevious(LocalTime value, int amount)
focal_class.class_method_signature: TimeGranularity.getPrevious(LocalTime value)
focal_class.full_signature: @Override public LocalTime getPrevious(LocalTime value)
focal_class.identifier: getPrevious
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value)
focal_class.return: LocalTime
focal_class.signature: LocalTime getPrevious(LocalTime value)
focal_class.class_method_signature: TimeGranularity.trimToGranularity(LocalTime value)
focal_class.full_signature: @Override public LocalTime trimToGranularity(LocalTime value)
focal_class.identifier: trimToGranularity
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime value)
focal_class.return: LocalTime
focal_class.signature: LocalTime trimToGranularity(LocalTime value)
focal_class.class_method_signature: TimeGranularity.getRandom(LocalTime min, LocalTime max, RandomNumberGenerator randomNumberGenerator)
focal_class.full_signature: @Override public LocalTime getRandom(LocalTime min, LocalTime max, RandomNumberGenerator randomNumberGenerator)
focal_class.identifier: getRandom
focal_class.modifiers: @Override public
focal_class.parameters: (LocalTime min, LocalTime max, RandomNumberGenerator randomNumberGenerator)
focal_class.return: LocalTime
focal_class.signature: LocalTime getRandom(LocalTime min, LocalTime max, RandomNumberGenerator randomNumberGenerator)
focal_class.class_method_signature: TimeGranularity.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: TimeGranularity.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: TimeGranularity.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: @Override
      public LocalTime getPrevious(LocalTime value, int amount) {
          if (!isCorrectScale(value)) {
              return trimToGranularity(value);
          }
          return value.minus(granularity.getDuration().multipliedBy(amount));
      }
focal_method.class_method_signature: TimeGranularity.getPrevious(LocalTime value, int amount)
focal_method.full_signature: @Override public LocalTime getPrevious(LocalTime value, int amount)
focal_method.identifier: getPrevious
focal_method.invocations: isCorrectScale trimToGranularity minus multipliedBy getDuration
focal_method.modifiers: @Override public
focal_method.parameters: (LocalTime value, int amount)
focal_method.return: LocalTime
focal_method.signature: LocalTime getPrevious(LocalTime value, int amount)