Google Drive Java API V2与V3(Google Drive Java API V2 vs V3)
我想开发一个新的java应用程序,它在我们的谷歌域中使用谷歌驱动器。 有版本2和版本3.我在另一个应用程序上使用版本2。
v2和v3之间的主要区别在哪里? 我可以毫无问题地使用v2吗?
I want to develop a new java application which uses google drive within our google domain. There are version 2 and version 3. I used version 2 on a another application.
Where are the main differances between v2 and v3? can i use v2 without any problems?
原文:https://stackoverflow.com/questions/40607308
更新时间:2023-09-15 22:09
最满意答案
混凝土类必须......更具体一点。
public class MVPPresenter<M, V extends IMVPView<MVPPresenter<M,V>>> implements IMVPPresenter<M, V> { protected void setView(V view) { view.setPresenter(this); // No more error on this line } }
Concrete classes must be … well a bit more concrete.
public class MVPPresenter<M, V extends IMVPView<MVPPresenter<M,V>>> implements IMVPPresenter<M, V> { protected void setView(V view) { view.setPresenter(this); // No more error on this line } }
相关问答
更多-
Java泛型的语法(Syntax of Java Generics)[2022-09-11]
如果我理解正确,您可以将所需类型作为方法参数传递: privatevoid makeGsonWebserviceRequest(/*...*/ Class requiredType) 然后传递JaiSamadhiServiceBaseListResponse.class作为参数。 If I understand correctly, you can pass the desired type as a method parameter: private void makeGsonW ... -
Java泛型问题(Trouble with Java generics)[2023-02-26]
您必须完全匹配泛型: Transformation- ,Double> transformation = new AveragingTransformer();
即将List>更改为List
。 如果您希望该工具应用于多种类型,请选择适当的已实现接口。 例如,这里Long实现Number所以我将拉回List 。 public interface Transformation { public B transform(A a) ... -
Java泛型和集合(Java Generics and Collections)[2022-06-15]
如果编译这样的代码是合法的,那么你可以在HashMap简单地插入其他类型的元素: HashMap> a = new HashMap >(); a.put(someIssue, new SomeClassThatImplementsListOfIssueButIsNotArrayList()); 这不是你所期望的。 ArrayList 是一个List ,但这不足以让此代码安全正确 ... -
一些Java泛型问题(A few Java Generics questions)[2023-02-03]
使用泛型集合与裸数组“更安全”的原因是因为编译器增加了额外的保证,即您的代码将执行预期的操作,因为它不太可能混合对使用不同类型参数创建的对象的引用您的部分编码错误。 例如,将MyClasses的混合添加到MyClass数组中是完全合法的: MyClassmcInt = new MyClass (); MyClass mcString = new MyClass (); MyClass[] array = new MyClass[] { mcI ... -
Class的Java泛型问题(Java generics issue with Class)[2023-11-30]
运行时的getClass()提供Class <?>。 由于类型擦除有关泛型参数的信息不可用。 你必须做一个演员 @SuppressWarnings("unchecked") public ObjectReference(LoadableObjectFactoryobj) { _cls = (Class extends LoadableObjectFactory >) obj.getClass(); } 让它工作 getClass() in runtime provides ... -
泛型的问题(Issue with Generics)[2023-06-08]
如果您在不指定类型参数的情况下使用泛型( implements BaseIntr ),则使用原始类型。 这些由Java语言规范定义如下: 为了方便与非通用遗留代码进行交互,可以使用参数化类型(§4.5)的擦除(第4.6节)或者元素类型为参数化类型的数组类型(第10.1节)的擦除。 这种类型被称为原始类型。 更确切地说,原始类型被定义为以下之一: 通过采用不带伴随类型参数列表的泛型类型声明的名称形成的引用类型。 和 未从其超类或超接口继承的原始类型C的构造函数(第8.8节),实例方法(第8.4节,第9.4节) ... -
泛型与Java的问题(Generics issue with Java)[2022-08-23]
将泛型类型指定为 Mapdata = this.aub.getData(); data.put("ip_macs", new LinkedList -
我想通过使用通用我来创建boardManager以扩展Number和Comparable来解决这个问题,如果泛型不扩展Number则会出错。 你不能这样做。 您不能在类上具有仅允许某些类型参数化的方法; 该类必须能够使用任何允许的类型参数完全运行。 您需要约束整个Board类以使T为Number 。 另一个错误是因为Class>与Class
不兼容。 >表示类型参数可能是任何可能的类型; 它可能是违反T约束的东西。 你需要强制转换为Class 。 I want to fix this is ... -
MVP泛型问题(Java)(MVP Generics Issue (Java))[2024-01-23]
混凝土类必须......更具体一点。 public class MVPPresenter>> implements IMVPPresenter { protected void setView(V view) { view.setPresenter(this); // No more error on this line } } Concrete classes must be … well ... -
GSON使用Java泛型(GSON using Java generics)[2022-05-03]
由于类型擦除, ValidationResult和ValidationResult是相同的类型。 该类型只有一个Class对象。 因为Gson只通过该Class对象知道ValidationResult ,所以它必须使用泛型类型的默认值。 在这种情况下,它使用LinkedHashMap 。 最简单的解决方案是提供一个TypeToken ,它可以解决类型擦除问题(但不是真的)。 你可以像这样使用它 gson.fromJson(json, new TypeToken 相关文章
更多- nagios微信报警(版本V2)
- MyBatis Java API详解
- 关于Java Me的文件系统应用之Fc Api
- hadoop杂记-为什么会有Map-reduce v2 (Yarn)
- Google TTS(文字转语音)api 2
- java API 操作 Zookeeper
- 十分钟了解分布式计算:Google Dataflow
- 微信商铺API手册V1.13-商品管理接口
- 使用kafka-clients api操作Kafka
- Android 使用隐藏API 开发应用程序
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)