code: public static boolean isValid(@Nullable final String hourRange) {
          if (hourRange == null) {
              return true;
          }
          final int p = hourRange.indexOf('-');
          if (p != 5) {
              return false;
          }
          final String fromStr = hourRange.substring(0, 5);
          final String toStr = hourRange.substring(6);
          if (!(Hour.isValid(fromStr) && Hour.isValid(toStr))) {
              return false;
          }
          final Hour from = new Hour(fromStr);
          final Hour to = new Hour(toStr);
          if (from.equals(to)) {
              return false;
          }
          if (from.equals(new Hour(24, 0))) {
              return false;
          }
          return !to.equals(new Hour(0, 0));
      }
docs: Verifies if the string is a valid hour range.
  
  @param hourRange
  Hour range string to test.
  
  @return {@literal true} if the string is a valid range, else {@literal false}.