/** * <p>Checks if the value's adjusted length is greater than or equal to the min.</p> * * @param value The value validation is being performed on. * @param min The minimum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is more than the specified minimum. */ public static boolean minLength(String value, int min, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) >= min); }
/** * <p>Checks if the value's adjusted length is less than or equal to the max.</p> * * @param value The value validation is being performed on. * @param max The maximum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is less than the specified maximum. */ public static boolean maxLength(String value, int max, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) <= max); }
/** * <p>Checks if the value's adjusted length is less than or equal to the max.</p> * * @param value The value validation is being performed on. * @param max The maximum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is less than the specified maximum. */ public static boolean maxLength(String value, int max, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) <= max); }
/** * <p>Checks if the value's adjusted length is greater than or equal to the min.</p> * * @param value The value validation is being performed on. * @param min The minimum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is more than the specified minimum. */ public static boolean minLength(String value, int min, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) >= min); }
/** * <p>Checks if the value's adjusted length is greater than or equal to the min.</p> * * @param value The value validation is being performed on. * @param min The minimum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is more than the specified minimum. */ public static boolean minLength(String value, int min, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) >= min); }
/** * <p>Checks if the value's adjusted length is less than or equal to the max.</p> * * @param value The value validation is being performed on. * @param max The maximum length. * @param lineEndLength The length to use for line endings. * @return true if the value's length is less than the specified maximum. */ public static boolean maxLength(String value, int max, int lineEndLength) { int adjustAmount = adjustForLineEnding(value, lineEndLength); return ((value.length() + adjustAmount) <= max); }