@Override
    public void assign(Object obj) {
        if (!checkAssign(obj)) {
            return;
        }
        if (obj instanceof Number) {
            value = ((Number) obj).longValue();
        } else if (obj instanceof NumericFieldValue) {
            value = (((NumericFieldValue) obj).getNumber().longValue());
        } else if (obj instanceof String || obj instanceof StringFieldValue) {
            value = Long.parseLong(obj.toString());
        } else {
            throw new IllegalArgumentException("Class " + obj.getClass() + " not applicable to an " + this.getClass() + " instance.");
        }
    }
A 64-bit integer field value

@author Einar M R Rosenvinge
document/src/main/java/com/yahoo/document/datatypes/LongFieldValue.java