1. 类与接口
2016-08-29 22:48:30 0 举报
类(Class)和接口(Interface)是面向对象编程中两个重要的概念。类是一种抽象的数据类型,用于描述具有相同属性和行为的对象集合。它是对象的模板,定义了对象的属性和方法。接口则是一种规范,定义了一组方法的签名,但不包含具体的实现。类可以实现一个或多个接口,从而继承接口中定义的方法。接口的主要作用是实现多态和解耦,让不同的类可以共享相同的行为规范。总之,类是对象的蓝图,接口是行为的规范。
作者其他创作
大纲/内容
Entry
+data:byte[]+etag:String+serverData:long+lastModified:long+responseHeaders:Map+ttl:long+softTtl:long
+isExpired():boolean+refreshNeed():boolean
CacheHeader
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ operation1(params):returnType- operation2(params)- operation3()
HttpStack(接口)
NetWork(接口)
+ performRequest(request):NetworkResponse
ResponseDelivery
BaseNetWork
- mHttpStack:HttpStack- mPool:ByteArrayPool
HurlStack
- mUrlRewriter:UrlRewriter-mSslSocketFactory: SSLSocketFactory
DiskBasedCache
Cache(接口)
0 条评论
下一页