⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tij0092.html

📁 学习java的经典书籍
💻 HTML
字号:
<html><body>

<table width="100%"><tr>
<td>
<a href="http://www.bruceeckel.com/javabook.html">Bruce Eckel's Thinking in Java</a>
</td>
<td align="right">
<a href="tij_c.html">Contents</a> | <a href="tij0091.html">Prev</a> | <a href="tij0093.html">Next</a>
</td>
</tr></table>
<hr>

<H2 ALIGN=LEFT>
The
generic collection library
</H2>
<DIV ALIGN=LEFT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">You&#8217;ve
seen in this chapter that the standard Java library has some fairly useful
collections, but far from a complete set. In addition, algorithms like sorting
are not supported at all. One of the strengths of C++ is its libraries, in
particular the <A NAME="Index821"></A><A NAME="Index822"></A><A NAME="Index823"></A></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>Standard
Template Library
</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
(STL) that provides a fairly full set of collections as well as many algorithms
like sorting and searching that work with those collections. Based on this
model, the <A NAME="Index824"></A>ObjectSpace
company was inspired to create the <A NAME="Index825"></A></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>Generic
Collection Library
</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>for
Java 
</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">(formerly
called the <A NAME="Index826"></A><A NAME="Index827"></A></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>Java
Generic Library
</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">,
but the abbreviation JGL is still used &#8211; the old name infringed on
Sun&#8217;s copyright), which follows the design of the STL as much as possible
(given the differences between the two languages). The JGL seems to fulfill
many, if not all, of the needs for a collection library, or as far as one could
go in this direction without C++&#8217;s template mechanism. The JGL includes
linked lists, sets, queues, maps, stacks, sequences, and iterators that are far
more functional than 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>Enumeration</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">,
as well as a full set of
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><B>
</B></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">algorithms
such as searching and sorting. ObjectSpace also made, in some cases, more
intelligent design decisions than the Sun library designers. For example, the
methods in the JGL collections are 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>not</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">
final so it&#8217;s easy to inherit and override those methods.
</FONT><P></DIV><DIV ALIGN=LEFT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">The
JGL has been included in some vendors&#8217; Java distributions and ObjectSpace
has made the JGL freely available for all uses, including commercial use, at 
</FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black"><I>http://www.ObjectSpace.com</I></FONT><FONT FACE="Carmina Md BT" SIZE=3 COLOR="Black">.
The online documentation that comes in the JGL package is quite good and should
be adequate to get you started.
</FONT><a name="_Toc408018577"></a><P></DIV>

<div align="right">
<a href="tij_c.html">Contents</a> | <a href="tij0091.html">Prev</a> | <a href="tij0093.html">Next</a>
</div>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -