当前位置:网站首页>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()
}
}
边栏推荐
- 【微服务|Sentinel】实时监控|RT|吞吐量|并发数|QPS
- 51 single chip microcomputer multi computer communication
- [redis realizes seckill service ②] solution to oversold problem
- Redis + Lua implementation of distributed interface current limiting
- EVM Brief
- JMeter socket connection sends data
- Tiktok wallpaper applet, starlight wallpaper applet version 2.0, upgraded version
- Add information on the left and add parts on the right of the status bar
- Sanic service startup failed
- 2022r1 quick opening pressure vessel operation test questions and answers
猜你喜欢

Source code analysis the problem that fragments cannot be displayed in the custom ViewGroup

2022 melting welding and thermal cutting recurrent training question bank simulated examination platform operation

【Redis实现秒杀业务④】一人一单,不可重复购买

Encryption and encoding resolution

【微服务|Sentinel】簇点链路|微服务集群环境搭建

I brush the question I - copy the linked list with random pointer

108页(4万字)未来公寓智能化设计平台项目方案建议书2022版

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

Use of JMeter

Custom animation (simulated win10 loading animation) - Optimization
随机推荐
Meta & Berkeley proposed a universal multi-scale visual transformer based on pooled self attention mechanism. The classification accuracy in Imagenet reached 88.8%! Open source
VNC viewer remote connection raspberry pie without display
Go crawler framework -colly actual combat (I)
Examination questions and mock examination for safety management personnel of hazardous chemical business units in 2022
Go crawler framework -colly actual combat (IV) -- Zhihu answer crawl (I)
Android SQLite database
Text editor for QT project practice - Episode 10
QT (36) -rapidjson parsing nested JSON
Thermodynamic diagram display correlation matrix
Custom animation (simulated win10 loading animation)
Wallpaper applet wechat applet
Tiktok wallpaper applet v1.0.2 function, new arrival function
Punch smart spirit 1. The brand is attractive. What is the strength of the product?
【Redis实现秒杀业务②】超卖问题的解决方案
移动安全工具-dex2jar
Introduction to smart contract security audit delegatecall (2)
How to reduce the font size of custom controls (optimize the round dot progress bar)
108页(4万字)未来公寓智能化设计平台项目方案建议书2022版
【微服务|Sentinel】簇点链路|微服务集群环境搭建
redis + lua实现分布式接口限流实现方案