class LongEncoder implements Encoder {

    @Override
    public long encode( Object value )
    {
        long longValue = ((Number)value).longValue();
        long length = numberOfDigits( longValue );
        length = length << 57;
        long returnVal = length | longValue;
        return returnVal;
    }

}