class ExplicitIndexValueValidator implements Validator<Object> {

    @Override
    public void validate( Object value )
    {
        if ( value == null )
        {
            throw new IllegalArgumentException( "Null value" );
        }
        if ( value instanceof String )
        {
            LuceneIndexValueValidator.INSTANCE.validate( ((String)value).getBytes() );
        }
        if ( !(value instanceof Number) && value.toString() == null )
        {
            throw new IllegalArgumentException( "Value of type " + value.getClass() + " has null toString" );
        }
    }

    private  ExplicitIndexValueValidator();

}