Check if zero
@param value        value string
@param valueClazz   value class
@return
332203
public static final boolean checkIfZero(String value, Class valueClazz)
    {
        boolean returnValue=false;
        if(value != null && NumberUtils.isNumber(value) && numberTypes.get(valueClazz) != null)
        {
            switch (numberTypes.get(valueClazz))
            {
            
            case INTEGER:
                returnValue = Integer.parseInt(value) == (NumberUtils.INTEGER_ZERO);
                break;

            case FLOAT:
                returnValue = Float.parseFloat(value) == (NumberUtils.FLOAT_ZERO);
                break;

            case LONG:
                returnValue = Long.parseLong(value) == (NumberUtils.LONG_ZERO);
                break;

            case BIGDECIMAL:
                // Note: cannot use 'equals' here - it would require both BigDecimals to have
                // the same scale.
                returnValue = (new BigDecimal(value)).compareTo(BigDecimal.ZERO) == 0;
                break;

            case BIGINTEGER:
                returnValue = (new BigInteger(value)).equals(BigInteger.ZERO);
                break;
            
            case SHORT:
                returnValue = (new Short(value)).shortValue() == NumberUtils.SHORT_ZERO.shortValue();
                break;
            }
        }
        
        return returnValue;
    }
755808
private boolean getBooleanValue(final Value value, final boolean defaultValue) {

		if (value != null && value instanceof BooleanValue) {

			return ((BooleanValue)value).isValue();
		}

		return defaultValue;
	}
1182052
protected function startsWithZeros($value) {
		$value = strval($value);
		if (strlen($value)>1 && strpos($value,'0')===0 && strpos($value,'0.')!==0) {
			return true;
		}
		else {
			return false;
		}
	}
500636
public FloatConstant getFloatByValue(float value)
  {
    for (int i = 0; i < _entries.size(); i++) {
      ConstantPoolEntry entry = _entries.get(i);

      if (! (entry instanceof FloatConstant))
        continue;

      FloatConstant floatEntry = (FloatConstant) entry;

      if (floatEntry.getValue() == value)
        return floatEntry;
    }

    return null;
  }
1249559
public static boolean verifyParameterConversion(
            Object value,
            final Class<?> expectedClz)
    {
        if (expectedClz == long.class) {
            assert(value != null);
            assert(value.getClass() == Long.class);
        }
        else if (expectedClz == int.class) {
            assert(value != null);
            assert(value.getClass() == Integer.class);
        }
        else if (expectedClz == short.class) {
            assert(value != null);
            assert(value.getClass() == Short.class);
        }
        else if (expectedClz == byte.class) {
            assert(value != null);
            assert(value.getClass() == Byte.class);
        }
        else if (expectedClz == double.class) {
            assert(value != null);
            assert(value.getClass() == Double.class);
        }
        else if (value != null) {
            Class<?> clz = value.getClass();
            if (ByteBuffer.class.isAssignableFrom(clz) && ByteBuffer.class.isAssignableFrom(expectedClz)) {
                return true;
            }
            if (clz != expectedClz) {
                // skip this without linking to it (used for sysprocs)
                return expectedClz.getSimpleName().equals("SystemProcedureExecutionContext") &&
                        expectedClz.isAssignableFrom(clz);
            }
            if (expectedClz.isArray()) {
                assert(clz.getComponentType() == expectedClz.getComponentType());
            }
        }
        return true;
    }
573124
@Pure
	@Inline(value = "Math.abs($1) < Math.ulp($1)", imported = Math.class)
	public static boolean isEpsilonZero(double value) {
		return Math.abs(value) < Math.ulp(value);
	}
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;
        }
    }
910400
public static <T> T eq(T value) {
        reportMatcher(new Equals(value));
        if (value == null)
            return null;
        return (T) Primitives.defaultValue(value.getClass());
    }
424928
private boolean isValueOutOfRange(final Double value) {
        return value == null || getMinValue() != Double.NEGATIVE_INFINITY && value < getMinValue()
                || getMaxValue() != Double.POSITIVE_INFINITY && value > getMaxValue();
    }
213798
public static BigRational valueOf(BigInteger value) {
		if (value.compareTo(BigInteger.ZERO) == 0) {
			return ZERO;
		}
		if (value.compareTo(BigInteger.ONE) == 0) {
			return ONE;
		}
		return valueOf(value, BigInteger.ONE);
	}
773294
public static int zero(int tc) {
        switch(tc) {
        case INTcode: case BYTEcode: case SHORTcode: case CHARcode:
            return iconst_0;
        case LONGcode:
            return lconst_0;
        case FLOATcode:
            return fconst_0;
        case DOUBLEcode:
            return dconst_0;
        default:
            throw new AssertionError("zero");
        }
    }
1061722
public static Float checkNull(Float value, Float elseValue) {
        return isNull(value) ? elseValue : value;
    }
299246
public <V> V getValue() {
        if (values == null || values.isEmpty()) {
            return null;
        }
        return (V)values.get(0);
    }
974914
@Override
	protected String initValuesImpl(final FieldCase ca) {
		if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
			return null;
		}
		String s = super.initValuesImpl(ca);
		int counter = 10000;
		while (set.contains(s) && counter > 0) {
			s = super.initValuesImpl(ca);
			counter--;
		}
		if (counter == 0) {
			throw new IllegalStateException("Could not generate unique value");
		}
		set.add(s);
		return s;
	}
288172
@Override
    public boolean containsValue(Object value) {
        if (value == null) {
            throw new NullPointerException();
        }

        for (Map.Entry<K, CachedValue<K, V>> entry : map.entrySet()) {
            CachedValue<K, V> cachedValue = entry.getValue();
            if (cachedValue.getValue().equals(value)) {
                if (isValueExpired(cachedValue)) {
                    if (map.remove(cachedValue.getKey(), cachedValue)) {
                        onValueRemove(cachedValue);
                    }
                } else {
                    readValue(cachedValue);
                    return true;
                }
            }
        }
        return false;
    }
252892
public static boolean isELValue(Object value) {
        String elVal = ObjectUtils.toString(value);
        elVal = StringUtils.trim(elVal);
        return StringUtils.startsWith(elVal, EL_PREFIX);
    }
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;
			}
		}
	}