多态性术语
我看了又看,却找不到我正在寻找的学术答案。
如果一个方法是多态的:
public class Widget
{
public void doSomething()
{
// ...
}
public void doSomething(int fizz)
{
// ...
}
}
...那么doSomething
可以说是Widget
类的多态方法。我正在寻找在提及多态方法的不同变体时使用的学术/数学术语。例如,在化学中,有同位素的概念,它是具有不同中子数量的原子变体。我希望能够说 doSomething(int)
是 doSomething()
的 x,就像氚是氘的同位素一样。
两种互为多晶型的方法的正确术语是什么……只是多晶型?多态性缀合物??!?
我知道在某个地方,有人知道这个问题的答案。
I've looked and I've looked, and can't find the academic answer I'm looking for.
If a method is polymorphic:
public class Widget
{
public void doSomething()
{
// ...
}
public void doSomething(int fizz)
{
// ...
}
}
... then doSomething
can be said to be a polymorphic method of class Widget
. I am looking for the academic/mathematical term to use when referring to the different varieties of a polymorphic method. For instance, in chemistry you have the concept of isotopes which are variants of atoms that simply have different numbers of neutrons. I want to be able to say that doSomething(int)
is an x of doSomething()
, much like Tritium is an isotope of Deuterium.
What's the correct terminology for two methods that are polymorphs of one another....just polymorphs? Polymorphic conjugates??!?
I know that somewhere, somebody knows the answer to this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
重载方法
。请参阅这篇 wiki 文章。更新:
如何从 doSomething() 的上下文中引用 doSomething(int)
在 C++/C#/Java 等语言中,这是常见的模式:
Overloaded method
. Look at this wiki article.Updated:
how do I refer to doSomething(int) from the context of doSomething()
In languages like C++/C#/Java it is common pattern: