Validate if {@code value} is a valid csv field without double-quotes.

@throws IllegalArgumentException if {@code value} needs to be encoded with double-quotes.
498908
private static void validateCsvFormat(CharSequence value) {
        int length = value.length();
        for (int i = 0; i < length; i++) {
            switch (value.charAt(i)) {
                case DOUBLE_QUOTE:
                case LINE_FEED:
                case CARRIAGE_RETURN:
                case COMMA:
                    // If value contains any special character, it should be enclosed with double-quotes
                    throw newInvalidEscapedCsvFieldException(value, i);
                default:
            }
        }
    }
263226
private static double convertStringToDouble(final String value) {
    double doubleValue = 0;
    if(!StringUtils.isBlank(value)) {
      try {
        doubleValue = Double.parseDouble(value.trim());
      }
      catch(Exception e) {
        // do nothing
      }
    }
    return doubleValue;
  }
240251
public static void notNegative(Long value) {
		if(!validation) return;
		notNull(value);
		if(value < 0)
			throw new ParameterException(ErrorCode.NEGATIVE);
	}
607119
public static final boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if (value.length() != 36) {
            return false;
        }
        try {
            UUID.fromString(value);
            return true;
        } catch (final RuntimeException ex) {
            return false;
        }
    }
1020268
private static CharSequence validValue(final CharSequence value) {
        if (!RsWithCookie.CVALUE_PTRN.matcher(value).matches()) {
            throw new IllegalArgumentException(
                String.format(
                    "Cookie value \"%s\" contains invalid characters",
                    value
                )
            );
        }
        return value;
    }
478298
public static void notNegative(Double value) {
		if(!validation) return;
		notNull(value);
		if(value < 0)
			throw new ParameterException(ErrorCode.NEGATIVE);
	}
1360297
public static boolean isPrimitive(Object value) {

        if (value == null) {
            return true;

        } else if (value.getClass().isPrimitive() == true) {
            return true;

        } else if (Integer.class.isInstance(value)) {
            return true;

        } else if (Long.class.isInstance(value)) {
            return true;

        } else if (Double.class.isInstance(value)) {
            return true;

        } else if (Float.class.isInstance(value)) {
            return true;

        } else if (Short.class.isInstance(value)) {
            return true;

        } else if (Byte.class.isInstance(value)) {
            return true;

        } else if (Character.class.isInstance(value)) {
            return true;

        } else if (Boolean.class.isInstance(value)) {
            return true;

        } else if (BigDecimal.class.isInstance(value)) {
            return true;

        } else if (BigInteger.class.isInstance(value)) {
            return true;
        }

        return false;
    }
450069
public boolean isDataNull(double value) {
		Double dataNull = getDataNull();
		boolean isDataNull = dataNull != null && dataNull == value;
		return isDataNull;
	}
1226597
public static final boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if ((value.length() < 3) || (value.length() > 20)) {
            return false;
        }
        return PATTERN.matcher(value.toString()).matches();
    }
246306
@Override
    public String handle(final Object value) {
        if (value instanceof Double) {
            return String.format(Locale.US, "%.14f", (Double) value);
        } else {
            throw new IllegalArgumentException("Can't serialize anything but Double");
        }
    }
141129
public static boolean isValidPropValue(Object value) {
        boolean isValid = false;

        if(value instanceof Boolean || value instanceof Integer || value instanceof Long
                || value instanceof Float || value instanceof Double || value instanceof String) {
            isValid = true;
        }

        return isValid;
    }
203817
public static boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        if (value.length() == 0) {
            return false;
        }
        try {
            InternetAddress.parse(value, false);
            return true;
        } catch (final AddressException ex) {
            return false;
        }
    }
661717
public synchronized boolean containsValue(Object value) {
		if(size == 0) {
			return false;
		} else {
			try {
				XAttributeMap map = deserialize();
				return map.containsValue(value);
			} catch (IOException e) {
				e.printStackTrace();
				return false;
			}
		}
	}
1362314
public static boolean isValid(final String value) {
        if (value == null) {
            return true;
        }
        final String uuidPattern = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-" + "[0-9a-f]{4}-[0-9a-f]{12}$";
        return Pattern.matches(uuidPattern, value);
    }
697241
def validate_data_provider(value)
      if value.is_a?(String)
        unless value =~ /^[a-zA-Z][a-zA-Z0-9_]*$/
          if value =~ /^[a-zA-Z]/
            raise ArgumentError, _("field 'data_provider' contains non-alphanumeric characters")
          else
            raise ArgumentError, _("field 'data_provider' must begin with a letter")
          end
        end
      else
        raise ArgumentError, _("field 'data_provider' must be a string")
      end
    end
415529
protected V decode(String value) {
    return valueSerializer.decode(BaseEncoding.base16().decode(value));
  }
182559
public static String quote(final String value) {
        if (value == null) {
            return null;
        }
        String result = value;
        if (!result.startsWith("\"")) {
            result = "\"" + result;
        }
        if (!result.endsWith("\"")) {
            result = result + "\"";
        }
        return result;
    }