flatter oneself

[flatter oneself] To be sure of your own talent or skill; highlyconfident.

I flatter myself that I am a better swimmer than he is.