Searches for a parameter value that is defined as a static constant in
this class.
@param value the parameter value
@return the object or null if not found
344703
public static ParticipationStatus find(String value) {
		if ("NEEDS ACTION".equalsIgnoreCase(value)) { //vCal
			return NEEDS_ACTION;
		}
		return enums.find(value);
	}
895556
public static Optional<String> getSpecifiedValue(@Nullable String value) {
        return isSpecified(value) ? Optional.ofNullable(value) : Optional.empty();
    }
135695
public Object setValue(final Object value) {
        final Object answer = this.value;
        this.value = value;
        return answer;
    }
369964
public static <T> T requireNonNull(T value, String parameterName) {
        if (value == null) {
            throw new NullPointerException(parameterName + " must not be null");
        }
        return value;
    }
1106176
public static <E> Function<Object, E> constant(@Nullable E value) {
    return new ConstantFunction<E>(value);
  }
45772
public static <V> Input<V> optional(@Nullable V value) {
    if (value == null) {
      return absent();
    } else {
      return fromNullable(value);
    }
  }
625122
final public static function byValue($value)
    {
        if (!isset(self::$constants[static::class])) {
            self::detectConstants(static::class);
        }

        $name = \array_search($value, self::$constants[static::class], true);
        if ($name === false) {
            throw new InvalidArgumentException(sprintf(
                'Unknown value %s for enumeration %s',
                \is_scalar($value)
                    ? \var_export($value, true)
                    : 'of type ' . (\is_object($value) ? \get_class($value) : \gettype($value)),
                static::class
            ));
        }

        if (!isset(self::$instances[static::class][$name])) {
            self::$instances[static::class][$name] = new static(self::$constants[static::class][$name]);
        }

        return self::$instances[static::class][$name];
    }
25770
public static Long getAsLong(Object value) {
		Long result = null;

		try {
			if (value instanceof String) {
				result = Long.valueOf((String) value);
			} else if (value instanceof Number) {
				result = ((Number) value).longValue();
			} else {
				result = null;
			}
		} catch (Exception e) {
			result = null;
		}

		return result == null ? 0 : result;
	}
1271224
public T get(V value) {
		T found = find(value);
		if (found != null) {
			return found;
		}

		synchronized (runtimeDefined) {
			for (T obj : runtimeDefined) {
				if (matches(obj, value)) {
					return obj;
				}
			}

			T created = create(value);
			runtimeDefined.add(created);
			return created;
		}
	}
1160906
public static Locale getLocale(
    Object      value)
  {
    if (value == null)
    {
        return null;
    }

    if (value instanceof Locale)
    {
        return ((Locale) value);
    }

    return getLocaleInternal(value.toString());
  }
937341
public static String getExactlyValue(final String value) {
        return null == value ? null : CharMatcher.anyOf("[]`'\"").removeFrom(value);
    }
141345
public EnumT valueOfStrict(String constant) {
    EnumT value = knownValues.get(constant);
    if (value != null) {
      return value;
    } else {
      throw new IllegalArgumentException(
          "Constant \"" + constant + "\" not found for enum \"" + clazz.getName() + "\"");
    }
  }
460093
public static String getClassFieldNameWithValue(Class clazz, Object value) {
		Field[] fields = clazz.getFields();
		for (int i = 0; i < fields.length; i++) {
			Field field = fields[i];
			try {
				Object constant = field.get(null);
				if (value.equals(constant)) {
					return clazz.getName() + "." + field.getName();
				}
			}
			catch (Exception e) {
				e.printStackTrace();
			}
		}
		return null;
	}
910400
public static <T> T eq(T value) {
        reportMatcher(new Equals(value));
        if (value == null)
            return null;
        return (T) Primitives.defaultValue(value.getClass());
    }
1269324
public static Expression constant(final double value) {
    return new Expression(Type.DOUBLE_TYPE, Feature.CHEAP) {
      @Override
      protected void doGen(CodeBuilder mv) {
        mv.pushDouble(value);
      }
    };
  }
924493
public static CharSequence toParameterValue(final Float value) {
        return value != null ? Float.toString(value) : Attr.nullValue();
    }
38306
public static final NumericalValue parseNumericalValue (final String value) {
        // return SingleNumericalValue ...
        final Matcher singleValueMatcher = SINGLE_CONSTANT_PATTERN.matcher(value);
        if (singleValueMatcher.matches()) return SingleNumericalValue.parseSingleNumericValue(value);
        // ... NumericalValueRange ...
        final Matcher rangeMatcher = NUMERICAL_RANGE_PATTERN.matcher(value);
        if (rangeMatcher.matches()) return NumericalValueRange.parseNumericalValueRange(value);
        // ... or null
        return null;
    }