Evaluate the value.
@param _value value to be evaluated
@return Long value
12016
protected Long eval(final Object[] _value)
    {
        final Long ret;

        if (_value == null) {
            ret = null;
        } else if (_value[0] instanceof String && ((String) _value[0]).length() > 0) {
            ret = Long.parseLong((String) _value[0]);
        } else if (_value[0] instanceof Number) {
            ret = ((Number) _value[0]).longValue();
        } else  {
            ret = null;
        }

        return ret;
    }
644359
public static long parseCacheControlSeconds(@Nullable String value) {
        if (value == null) {
            return -1;
        }

        try {
            final long converted = Long.parseLong(value);
            return converted >= 0 ? converted : -1;
        } catch (NumberFormatException e) {
            return -1;
        }
    }
75768
public void updateLongLE(long value) {
        finished = false;
        switch (partialPos) {
            case 0:
                partialK1 = value;
                break;
            case 8:
                partialK2 = value;
                break;
            default:
                throw new IllegalStateException("Cannot mix long with other alignments than 8: " + partialPos);
        }

        partialPos += 8;
        if (partialPos == 16) {
            applyKs(partialK1, partialK2);
            partialPos = 0;
        }
        length += 8;
    }
641506
protected static long parseLongParameter (String value, String invalidDataMessage)
        throws DataValidationException
    {
        try {
            return Long.parseLong(value);
        } catch (NumberFormatException nfe) {
            throw new DataValidationException(invalidDataMessage);
        }
    }
837704
@SuppressWarnings("checkstyle:magicnumber")
    void writeLong(long value) {
        if (value == Long.MIN_VALUE) {
            write(STR_LONG_MIN_VALUE);
            return;
        }

        if (value < 0) {
            write('-');
            value = -value;
        }

        int digitsWithoutComma = 0;
        tmpSb.setLength(0);
        do {
            digitsWithoutComma++;
            if (digitsWithoutComma == 4) {
                tmpSb.append(',');
                digitsWithoutComma = 1;
            }

            int mod = (int) (value % 10);
            tmpSb.append(DIGITS[mod]);
            value = value / 10;
        } while (value > 0);

        for (int k = tmpSb.length() - 1; k >= 0; k--) {
            char c = tmpSb.charAt(k);
            write(c);
        }
    }
1865
public void setLong(Long value) {
		this.checkNull(value);
		list.add(value);
		type.add(Long.class);
	}
585034
public static long toLongValue(Object o) throws PageException {
	if (o instanceof Boolean) return ((((Boolean) o).booleanValue()) ? 1L : 0L);
	else if (o instanceof Number) return (((Number) o).longValue());
	else if (o instanceof CharSequence) {
	    String str = o.toString();
	    try {
		return Long.parseLong(str);
	    }
	    catch (NumberFormatException nfe) {
		return (long) toDoubleValue(str);
	    }
	}
	else if (o instanceof Character) return (((Character) o).charValue());
	else if (o instanceof Castable) return (long) ((Castable) o).castToDoubleValue();
	else if (o instanceof ObjectWrap) return toLongValue(((ObjectWrap) o).getEmbededObject());

	throw new CasterException(o, "long");
    }
833493
public static Long getLong(String name, Long defaultValue) {
		return Long.getLong(name, defaultValue);
	}
390087
public static long parseDate(String value) {
        Date date = null;
        for (SimpleDateFormat format : FORMATS_TEMPLATE) {
            try {
                date = format.parse(value);
            } catch (ParseException e) {
                // Nothing.
            }
        }

        if (date == null) return -1L;
        return date.getTime();
    }
1232746
synchronized long systemUpdate(long value) {

        if (value == currValue) {
            currValue += increment;

            return value;
        }

        if (increment > 0) {
            if (value > currValue) {
                currValue = value + increment;
            }
        } else {
            if (value < currValue) {
                currValue = value + increment;
            }
        }

        return value;
    }
511179
public static long getLong(@NotNull ServletRequest request, @NotNull String param, long defaultValue) {
    String value = request.getParameter(param);
    return NumberUtils.toLong(value, defaultValue);
  }
190667
public static Long toLong(Object value, Long defaultValue) {
		return convert(Long.class, value, defaultValue);
	}
1259926
public final long getAttributeValueAsLong(String attributeName) {
    Attribute attribute = getAttribute(attributeName);
    if (attribute == null) {
      return 0;
    }
    else {
      try {
        return attribute.getLongValue();
      }
      catch (DataConversionException ex) {
        return 0;
      }
    }
  }
1231482
protected Long eval(final Object... _values)
    {
        final Long ret;

        if (_values == null || _values.length == 0 || _values[0] == null)  {
            ret = null;
        } else if (_values[0] instanceof String && !"".equals(_values[0])) {
            ret = Long.parseLong((String) _values[0]);
        } else if (_values[0] instanceof Number) {
            ret = ((Number) _values[0]).longValue();
        } else  {
            ret = null;
        }

        return ret;
    }
1312781
public int lengthOf(String value) {
        int length = 0;
        if (value != null) {
            length = value.length();
        }
        return length;
    }
811926
public static boolean isLongValue(final String value) {
        try {
            Long.parseLong(value);
            return true;
        } catch (final NumberFormatException ex) {
            return false;
        }
    }
310918
public static Expression constant(final long value) {
    return new Expression(Type.LONG_TYPE, Feature.CHEAP) {
      @Override
      protected void doGen(CodeBuilder mv) {
        mv.pushLong(value);
      }
    };
  }