@Override
    public void assign(Object obj) {
        if (!checkAssign(obj)) return;

        if (obj instanceof Number)
            value = ((Number) obj).floatValue();
        else if (obj instanceof NumericFieldValue)
            value = (((NumericFieldValue) obj).getNumber().floatValue());
        else if (obj instanceof String || obj instanceof StringFieldValue)
            value = Float.parseFloat(obj.toString());
        else
            throw new IllegalArgumentException("Class " + obj.getClass() + " not applicable to an " + this.getClass() + " instance.");
    }
A 16-bit float field value

@author bratseth
document/src/main/java/com/yahoo/document/datatypes/Float16FieldValue.java