<human>: So I just had a pretty upsetting experience with the police, and I want to get Reddit's opinion on it, especially since all my housemates disagree with me.

So I'm at a party, my second year of college, and I'm having a great time, being generally pleasant to everyone there. After about 2 hours (around midnight) people start filing out since the cops showed up and are breaking up the party. Since I'm drunk and forgetful, I walk out of the party holding a 40 (it's only about 1/8 full).

As I'm filing out, single file, in order just like everyone else, this is the dialogue that takes place between me and the cop.

Cop: (seeing my 40) Are you stupid?

Me: (Offended) no....

Cop: What's in that bottle?

Me: (Obviously Offended) Uhh.. water

Cop: Put the fucking bottle on the ground and get out of here.

Now, I know that the cop let me off easy. I get this. He could have easily arrested me, but that is the exact same thing that I have such a problem with. He could have EASILY arrested me, yet here he is belittling me (calling me stupid) and swearing at me (leave the fucking bottle). I believe that this is an inappropriate way for a police officer to act. My housemates disagree with me, so I am turning to reddit for support/general information. So what do you think about this? (sorry this is so long)

Summarize the given text in a few sentences.
<bot>: I was accidentally but obviously breaking a minor law, and a cop calls me stupid and swears at me. Is this an appropriate way for a police officer to act? Why or why not?