包含/排除枚举的命名
我在命名应具有值 Include
和 Exclude
的枚举时遇到困难。如果枚举是 In
和 Out
,我会将枚举命名为 Direction
,但是与组 Include 相似且合适的词是什么
和排除
?
枚举的上下文和应用是设置是否将选定的对象包含在较大的集合中或从较大的集合中排除。
I'm having difficulties naming an enum that should have the values Include
and Exclude
. If the enumerations were In
and Out
, I'd name the enum Direction
, but what's the similar and appropriate word to group Include
and Exclude
?
The context and application of the enum is to set whether a selection of objects are to be included in or excluded from a larger set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
“包容”怎么样?
How about "Inclusion"?
也许
过滤器
?或者条件
?Filter
maybe? OrCondition
?我想这实际上取决于上下文,很难为如此模糊的概念给出一个单一的名称。
一体化 ?集成(规则|策略)?是的,我知道这并不令人信服。
That would really depend on the context I guess, it hard to give a single name to such vague concepts.
Integration ? Integration(Rule|Policy) ? Yeah, not convincing I know.
这似乎与集合和子集有关。我会说类似 SetRelation 之类的东西。如果您正在谈论 Set 元素,那么也许您应该使用 Element (BelongsTo|DoesNotBelongTo)
That seems to be related to Sets and Subsets. I would say something like SetRelation. If you're talking about Set elements, then maybe you should use Element (BelongsTo|DoesNotBelongTo)
SelectionUsage 或 SelectionUsageType
SelectionUsage or SelectionUsageType
T(过滤器)操作 = (foIninclude, foExclude)
T(Filter)Operation = (foInclude, foExclude)