当前位置:网站首页>How many knowledge points can a callable interface have?
How many knowledge points can a callable interface have?
2022-07-02 14:13:00 【User 1263954】
Concurrent programming has always been a headache for programmers , How to write a correct concurrent program compared to other programs , It's a more difficult thing , In concurrent programming Bug It is often very strange .
The reason why concurrent programming appears Bug It's weird , Because in concurrent programming , A lot of times Bug It may not be perfectly reproduced , in other words , Concurrent programming Bug It's hard to reproduce , Hard to track .
today , The glacier brought the little friends back again Callable Interface , Okay , Let's get to the point .
This article is pure dry goods , In depth analysis from the perspective of source code Callable Interface , I hope you will step down , Open your IDE, Follow the article to see the source code , I believe you will gain a lot .
Callable The interface is introduced
Callable Interface is JDK1.5 New generic interface , stay JDK1.8 in , Declared as a functional interface , As shown below .
@FunctionalInterface public interface Callable<V> { V call() throws Exception; }
stay JDK 1.8 Only one method's interface is declared as a functional interface in , Functional interfaces can be used @FunctionalInterface To modify , You can also not use @FunctionalInterface To modify . As long as an interface contains only one method , that , This interface is a functional interface .
stay JDK in , Realization Callable The subclass of the interface is shown in the figure below .
The default subclass hierarchy diagram is not clear , here , Can pass IDEA Right click Callable Interface , choice “Layout” To specify the Callable Interface implementation, different structure of class diagram , As shown below .
here , You can choose “Organic Layout” Options , After selection Callable The structure of subclasses of interfaces is shown in the figure below .
In the realization of Callable In subclasses of interfaces , There are several important classes , As shown in the figure below .
边栏推荐
- Chaos engineering platform chaosblade box new heavy release
- How to use SAP's metadata framework (MDF) to build custom business rules?
- 腾讯云 TStor 统一存储通过信通院首批文件存储基础能力评测
- Drawing Nyquist diagram with MATLAB
- OpenHarmony笔记-----------(四)
- Custom events, global event bus, message subscription and publishing, $nexttick
- 693. 行程排序(map + 拓扑)
- Methods of software testing
- 故事点 vs. 人天
- Data Lake (11): Iceberg table data organization and query
猜你喜欢
Qt新建项目
自定义事件,全局事件总线,消息订阅与发布,$nextTick
全屋Wi-Fi:一个谁也解决不好的痛点?
刚好1000粉丝,记录一下
Use of swagger
[development environment] Dell computer system reinstallation (download Dell OS recovery tool | use Dell OS recovery tool to make USB flash disk system | install system)
selenium 在pycharm中安装selenium
[development environment] 010 editor tool (tool download | binary file analysis template template installation | shortcut key viewing and setting)
Development skills of rxjs observable custom operator
[to be continued] [UE4 notes] l5ue4 model import
随机推荐
Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute
[document tree, setting] font becomes smaller
TeamTalk源码分析之win-client
【虹科技术分享】如何测试 DNS 服务器:DNS 性能和响应时间测试
Browser driven Download
How to set QT manual layout
selenium的特点
Qt-制作一个简单的计算器-实现四则运算-将结果以对话框的形式弹出来
Essential elements of science fiction 3D scenes - City
Selenium, element operation and browser operation methods
每天坚持20分钟go的基础二
如何设置Qt手工布局
Generally speaking, if the error of inconsistent tab and space occurs frequently
rxjs Observable 自定义 Operator 的开发技巧
博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
QT how to set fixed size
Codeforces Round #803 (Div. 2)(A~D)
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
Pattern matching and regular expressions in PostgreSQL - Das
Word frequency statistics & sorting