In programming languages and type theorypolymorphism (from Greek πολύςpolys, "many, much" and μορφήmorphē, "form, shape") is the provision of a single interface to entities of different types.[1] A polymorphic type is one whose operations can also be applied to values of some other type, or types.[2] There are several fundamentally different kinds of polymorphism:

  • Ad hoc polymorphism: when a function has different implementations depending on a limited range of individually specified types and combinations. Ad hoc polymorphism is supported in many languages using function overloading.
  • Parametric polymorphism: when code is written without mention of any specific type and thus can be used transparently with any number of new types. In the object-oriented programming community, this is often known as generics or generic programming. In the functional programming community, this is often shortened to polymorphism.
  • Subtyping (also called subtype polymorphism or inclusion polymorphism): when a name denotes instances of many different classes related by some common superclass.[3]

https://en.wikipedia.org/wiki/Polymorphism_(computer_science)

最新文章

  1. easyui 数据库修改部分(基于数据添加逻辑功能修改)
  2. Java的泛型反射
  3. jquery 让滚动条处于div底部
  4. 【原创】使用Fiddler抓取手机网络包
  5. redis基本配置和相关设置
  6. 【BZOJ 2820】YY的GCD
  7. VBS 相关知识 笔记
  8. 利用Cydia Substrate进行Android HOOK(二)
  9. python的闭包与装饰器
  10. 成都Uber优步司机奖励政策(2月21日)
  11. Area - POJ 1265(pick定理求格点数+求多边形面积)
  12. sqlsever连接两个不同服务器上的数据库进行查询
  13. 关于onclick中的event对象和element对象
  14. pexpect-pxssh-登陆Linux-执行命令
  15. 2007LA 3902 网络(树+贪心)
  16. Kafka入门 --安装和简单实用
  17. mac 苹果多版本jdk自由切换
  18. 【linux】Linux误删C基本运行库libc.so.6急救方法
  19. sam9260 adc module
  20. 【xsy1143】 兔子的数字 搜索

热门文章

  1. Element 'dependencies' cannot have character[children],because the type's content type is elemen
  2. py文件控制台执行时,报错:引入的模块不存在
  3. RSA 数据加密和数字签名算法
  4. Android: Could not find com.android.support:support-v4:21.0.0
  5. c++ 双冒号的作用
  6. 安装 KB2844286 导致SharePoint 2010 XSLT web part 显示出现错误
  7. vue组件的一个总结
  8. 阻尼滑动--能够滑动过度的ScrollView(OverScrollView)
  9. hdu4289 Control --- 最小割,拆点
  10. 最全Linux 与 Linux Windows 文件共享