Was I right in doing this?

I broke up with my now ex-boyfriend a few days ago, after roughly 2 weeks of arguing and 2 days of ignoring each-other. I realized that he (lets call him J) didn't want to help me find a solution to the argument (which was about the fact that he thought I was unhappy about the relationship, which in truth was a lie), and that I deserved better than that negativity and non-commitment to find a solution.
We'd been dating for roughly a year, and during that time I'd received 2 gifts from J. After I broke up with him, I went and found those 2 gifts from my room, and took them to school with me to ''re-gift'' them back to J.
When he finally showed, I took them out of my bag, stuffed each into one of his pockets, and with a blank expression looked up into his eyes and simply said: ''Have a nice life'' and walked off.
Was I in the right for giving them back to him and saying that?
Was I right in doing this?
Add Opinion