Mohammad Rezaei

Results 94 comments of Mohammad Rezaei

@arvidvillen The most used collection for representing results coming from a database is a simple list. It's naturally ordered, random access and has a superior interface compared to a set.

What do the implementations look like? do they have to re-implement every time?

Since the impls are simple (hey, that rhymes :smile:), I think it's fine.

Doesn't this break FILO? Our stacks are meant to honor their contracts, not expose their guts.

Said differently, why would one use a stack data structure, then choose to iterate from the bottom? Why not just use a list?

I see. That's as reasonable use case. No objection to this implementation.

To clarify my earlier comment: I'm ok with implementing reversible on `IntArrayStack` (the concrete class), but not the interface.

That's more or less by design. Neither case can complete successfully, which leaves only one option: throw an exception. So we could wax poetic about what the exception should be...

You sure about the JDK size? The following just worked for me in 1.8 and 11: ```java HashMap objectObjectHashMap = new HashMap((1