当前位置:网站首页>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()
}
}
边栏推荐
- Realization of MNIST handwritten numeral recognition
- Applet opening traffic master
- I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
- 生成订单30分钟未支付,则自动取消,该怎么实现?
- 2022 melting welding and thermal cutting recurrent training question bank simulated examination platform operation
- Sanic service startup failed
- Thingsboard - rest API obtains and refreshes tokens
- The picture of wechat official account can not be displayed normally
- 【Redis实现秒杀业务②】超卖问题的解决方案
- 不重要的token可以提前停止计算!英伟达提出自适应token的高效视觉Transformer网络A-ViT,提高模型的吞吐量!...
猜你喜欢

I 刷题 I — 复制带随机指针的链表

Custom animation (simulated win10 loading animation) - Optimization

2022年起重机司机(限桥式起重机)考试题库模拟考试平台操作

Go crawler framework -colly actual combat (4) -- Zhihu answer crawl (2) -- visual word cloud

ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’

Thermodynamic diagram display correlation matrix

Use of JMeter easynmon

Custom control - round dot progress bar (imitating one key acceleration in security guard)

2021-09-12

Using tcp/udp tools to debug the yeelight ribbon
随机推荐
I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
What is test development? Can you find a job at this stage?
[redis realizes seckill business ③] specific implementation of optimistic lock for oversold problem
【Redis实现秒杀业务③】超卖问题之乐观锁具体实现
I 刷题 I — 复制带随机指针的链表
Paint rounded rectangle
Helm chart仓库操作
EVM简略
Usage of assert
The acceleration of 100 km is only 5.92 seconds, and the willanda high-performance version leads with the strength of high-energy products
Activity startup process
ServerSocket and socket connection
Redis + Lua implementation of distributed interface current limiting
【微服务|Sentinel】实时监控|RT|吞吐量|并发数|QPS
【Redis实现秒杀业务②】超卖问题的解决方案
2022年全国最新消防设施操作员(高级消防设施操作员)模拟题及答案
iNFTnews | 国内NFT发展仅限于数字藏品吗?
Tiktok wallpaper applet v1.0.2 function, new arrival function
Thermodynamic diagram display correlation matrix
Custom animation (simulated win10 loading animation) - Optimization