开发者

Name For Stack With Unique Values

开发者 https://www.devze.com 2023-01-11 16:13 出处:网络
I\'m using .NET 3.5 to create an application that requires a Stack<T> with unique values. I realize I could cal开发者_如何学JAVAl Contains() before every Push(), but it makes sense semantically

I'm using .NET 3.5 to create an application that requires a Stack<T> with unique values. I realize I could cal开发者_如何学JAVAl Contains() before every Push(), but it makes sense semantically that I roll my own "unique stack" (UniqueStack<T> or maybe HashStack<T>?). I'm having a hard time to determine a strong name for this data structure.

I hate the fact that Stack<T> doesn't implement some IStack<T>...

Thoughts are appreciated.


  • ExclusiveStack?
  • DistinctStack?

Personally, I like your UniqueStack or UniqueItemStack

0

精彩评论

暂无评论...
验证码 换一张
取 消