method to construct {@link VINT} based on its value

@param value
- value of {@link VINT}
@return {@link VINT} corresponding to this value
184802
public static VINT fromValue(long value) {
        BitSet bs = BitSet.valueOf(new long[] { value });
        byte length = (byte) (1 + bs.length() / BIT_IN_BYTE);
        if (bs.length() == length * BIT_IN_BYTE) {
            length++;
        }
        bs.set(length * BIT_IN_BYTE - length);
        long binary = bs.toLongArray()[0];
        return new VINT(binary, length, value);
    }
721019
public String set(String value)
    {
        String prevValue = setString(value);
        if (prevValue == null) {
            prevValue = getDefaultValue();
        }
        return prevValue;
    }
207209
public static PriceTypeEnumeration findByValue(final String value) {
        if (value.equalsIgnoreCase("negotiable")) {
            return PriceTypeEnumeration.NEGOTIABLE;
        } else {
            return PriceTypeEnumeration.STARTING;
        }
    }
321104
public VarSetBuilder hasIf( String name, Object value)
    {
    return
      value != null
      ? has( name, value)
      : this;
    }
81595
public static Integer getAsInteger(Object value) {
		Integer result = null;

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

		return result == null ? 0 : result;
	}
612408
public V setValue(final V value) {
		V oldValue = this.getValue();
		this.values[tree.pageIndex] = value;
		return oldValue;
	}
50028
public static TypedValue untypedValue(Object value) {
    if (value instanceof TypedValue) {
      return untypedValue(value, ((TypedValue) value).isTransient());
    }
    else return untypedValue(value, false);
  }
785595
public static ConstantValueExpression makeExpression(VoltType dataType, String value) {
        ConstantValueExpression constantExpr = new ConstantValueExpression();
        constantExpr.setValueType(dataType);
        constantExpr.setValue(value);
        return constantExpr;
    }
73228
public final Condition ne(final V value) {
        return new Condition().withComparisonOperator(NE).withAttributeValueList(convert(value));
    }
106802
public ValueInterval<T, I, V> withValue(V value) {

        return new ValueInterval<>(this.interval, value);

    }
766965
public boolean containsValue(Object value) {
        for (LinkedHashMapEntry<K,V> e = head; e != null; e = e.after) {
            V v = e.value;
            if (v == value || (value != null && value.equals(v)))
                return true;
        }
        return false;
    }
1122956
public VarValueDefBuilder hasIf( String name, Object value)
    {
    return
      value != null
      ? has( name, value)
      : this;
    }
886183
public VarDefBuilder hasIf( String name, Object value)
    {
    return
      value != null
      ? has( name, value)
      : this;
    }
655617
public static Object createOptional(final Object value) {
        if ((OPTIONAL_CLASS == null) || (OFNULLABLE == null)) {
            throw new IllegalStateException("Unreachable Code executed. You just found a bug. Please report!");
        }
        try {
            return OFNULLABLE.invoke(null, value);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
190392
public CommandArgs<K, V> addValue(V value) {

        singularArguments.add(ValueArgument.of(value, codec));
        return this;
    }
621847
public static <T> T checkAndGet(T value, T defaultValue, Validator<T> v) {
		if (v.validate(value)) {
			return value;
		}

		return defaultValue;
	}
787795
public T convert(Object value)
    {
        T result = null;
        if (value != null)
        {
            if (getValueClass().isInstance(value))
                result = getValueClass().cast(value);
            else
                result = convertFromString(value.toString());
        }
        return result;
    }