code: public static boolean isValidLong(@Nullable final String longStr, final long lowerBound, final long upperBound, final boolean includeLowerBound, final boolean includeUpperBound) {
          if (lowerBound > upperBound) {
              throw new IllegalArgumentException(ExceptionValues.INVALID_BOUNDS);
          } else if (!isValidLong(longStr)) {
              return false;
          }
          final long aLong = toLong(longStr);
          final boolean respectsLowerBound = includeLowerBound ? lowerBound <= aLong : lowerBound < aLong;
          final boolean respectsUpperBound = includeUpperBound ? aLong <= upperBound : aLong < upperBound;
          return respectsLowerBound && respectsUpperBound;
      }
docs: Given a long integer string, it checks if it's a valid long (base on apaches NumberUtils.createLong) and if
  it's between the lowerBound and upperBound.
  
  @param longStr        the long integer string to check
  @param lowerBound        the lower bound of the interval
  @param upperBound        the upper bound of the interval
  @param includeLowerBound boolean if to include the lower bound of the interval
  @param includeUpperBound boolean if to include the upper bound of the interval
  @return true if the long integer string is valid and in between the lowerBound and upperBound, false otherwise
  @throws IllegalArgumentException if the lowerBound is not less than the upperBound