- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
swing gui设计
Collection API ArrayList Vector Reflection API Collections API 收集是代表一个对象组的单个对象,被认为是它的元素。 Collections :没有具体顺序的一组对象 Set :没有复制的一组对象 List :有序对象组,允许复制 收集中,代表一个对象组的单个对象被认为是它的元素;对象的类型都有一个特殊的种类,即它们都是从一个共同父类型延续来的。 Java支持Vector,Bits, Stack, Hashtable, LinkedList等。 Stack实现后进先出(LIFO)的顺序 Hashtable提供一个相关的对象数组。 API还包括诸如HashSet, ArraySet, ArrayList, LinkedList和Vector等等的类,它们实现这些接口。 API还提供了支持某些算法的方法,如:排序,二进制搜索,评估列表中的最小和最大,以及收集等。 通过Iterators, 获取Collections结构中的element 无序的Set List结构的Iterators可以使用next 和previous方法遍历 Reflection API For each class, the Java Runtime Environment (JRE) maintains an immutable Class object that contains information about the class With the reflection API, you can invoke methods on a Class object which return Constructor , Method , and Field objects. You can use these objects to get information about the corresponding constructors, methods, and fields defined in the class. Class Class Instances of the class Class represent classes and interfaces in a running Java application. Class has no public constructor. Retrieving Class Objects If an instance of the class is available Class c = mystery.getClass(); retrieve the Class object for the superclass TextField t = new TextField(); Class c = t.getClass(); Class s = c.getSuperclass(); know the name of the class at compile time Class c = java.awt.Button.class; the class name is unknown at compile time, but available at runtime Class c = Class.forName(strg); * * Collections API Iterators Map结构由Key和Value对构成 Map Sorting arrays using Array.sort method: Sorting list using Collection.sort method: Void sort (List ) ; Void Sort ( List , Comparator ) ; The comparable and comparator interfaces Comparable: compareTo(element : Object): int Comparator: compare(e1: Object, e2:Object) : int Comparator: equals (Object, Object ) : blooean Sorting a set using a SortedSet implementation Sorting Array and Collections Vector implements the List interface Stack is a subclass of Vector push/pop/peek method Hasht
您可能关注的文档
- 5小时本试卷共有三类题型单项选择、多项选 .doc
- 5雨湖区烟花爆竹批发企业主体责任清单(试行).doc
- 6 三相变压器.ppt
- 5高频功率放大器的电路组成.ppt
- 6 安徽省土地利用现状分类及耕地占用税征收范 .doc
- 6.4 linux文件管理 linux文件系统的树形结构 比较ms .ppt
- 631 法学基础理论 - 海洋大学.doc
- 6、1晶闸管(scr).doc
- 6、“互联网+教师培训”的协同创新发展策略.doc
- 6、基尔霍夫电流定律仅适用于电路中的节点与原 .doc
- swot分析 - 国立基隆高级商工职业学校.doc
- szgx2015290-营运车辆动态监控及安全监测研究( .doc
- template for point presentations - 中证 .ppt
- tobe创新产品的沟通策略 - 南台科技大学知识分 .ppt
- topic 5 行为经济学(ch17) - 个人网页上传教学.ppt
- tpm (total productive maintenance) 全员参加の .ppt
- u-mail174gateway 使用手册.doc
- typical capital raising transactions - 投资银行在线.ppt
- unit 1 how often do you exercise? - 98学习网- .doc
- ups功能的高品质逆变器为全铜变压器打造内 .doc
文档评论(0)