当前位置:网站首页>Scala adapter pattern
Scala adapter pattern
2022-06-25 01:03:00 【Jue Niu thunder plough hot blade】
object Adapter pattern {
trait PlayLOL {
// On a single
def top(): Unit
// In a single
def mid(): Unit
// Output bit , Down the road
def adc(): Unit
// auxiliary
def support(): Unit
// A wild
def jungle(): Unit
// Primary school students
def schoolChild(): Unit
}
class Player extends PlayLOL {
override def top(): Unit = {
}
override def mid(): Unit = {
}
override def adc(): Unit = {
}
override def support(): Unit = {
}
override def jungle(): Unit = {
}
override def schoolChild(): Unit = {
}
}
class GreenHand extends Player {
override def support(): Unit = println("B Key one button , Don't go back to the city if you don't die ")
override def schoolChild(): Unit = println(" You scold me , I'll hang up ")
}
def main(args: Array[String]): Unit = {
val gh = new GreenHand
gh.support()
gh.schoolChild()
}
}
边栏推荐
- Helm chart warehouse operation
- 移动安全工具-jarsigner
- 智能合约安全审计入门篇 —— delegatecall (2)
- JSON file of China's provincial boundaries
- ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’
- VNC viewer remote connection raspberry pie without display
- Practical operation notes - notebook plus memory and ash cleaning
- EVM Brief
- 移动安全工具-dex2jar
- 热力图展示相关矩阵
猜你喜欢
生成订单30分钟未支付,则自动取消,该怎么实现?
Practical operation notes - notebook plus memory and ash cleaning
Custom animation (simulated win10 loading animation) - Optimization
[microservices sentinel] cluster link | microservices cluster environment construction
How to use promise Race() and promise any() ?
最新QQ微信域名防红PHP程序源码+强制跳转打开
Technologie des fenêtres coulissantes en octets dans la couche de transmission
ServerSocket and socket connection
Text editor for QT project practice -- Episode 9
JMeter socket connection sends data
随机推荐
More pictures | explain the Nacos parameters in detail!
Custom control - round dot progress bar (imitating one key acceleration in security guard)
C#和C 的CAN通信实验
Previous basic review
我想问一下兴业证券怎么开户?通过链接办理股票开户安全吗
Go crawler framework -colly actual combat (I)
Usage of assert
Introduction to smart contract security audit delegatecall (2)
In the process of enterprise development, I found that a colleague used the select * from where condition for update
2019 summary and 2020 outlook
[redis realizes seckill service ②] solution to oversold problem
JSON file of China's provincial boundaries
移动安全工具-apktool
2021-11-07
Xcode preview displays a bug in the content of the list view and its solution
【微服务|Sentinel】簇点链路|微服务集群环境搭建
2022熔化焊接与热切割复训题库模拟考试平台操作
Sanic service startup failed
Applet opening traffic master
2021-02-15