abstractresourcecollection.html
来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 885 行 · 第 1/3 页
HTML
885 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:24 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>AbstractResourceCollection (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.feature.collection.AbstractResourceCollection class"><META NAME="keywords" CONTENT="open"><META NAME="keywords" CONTENT="isEmpty()"><META NAME="keywords" CONTENT="contains()"><META NAME="keywords" CONTENT="toArray()"><META NAME="keywords" CONTENT="add()"><META NAME="keywords" CONTENT="remove()"><META NAME="keywords" CONTENT="containsAll()"><META NAME="keywords" CONTENT="addAll()"><META NAME="keywords" CONTENT="removeAll()"><META NAME="keywords" CONTENT="retainAll()"><META NAME="keywords" CONTENT="clear()"><META NAME="keywords" CONTENT="toString()"><META NAME="keywords" CONTENT="iterator()"><META NAME="keywords" CONTENT="size()"><META NAME="keywords" CONTENT="close()"><META NAME="keywords" CONTENT="openIterator()"><META NAME="keywords" CONTENT="closeIterator()"><META NAME="keywords" CONTENT="purge()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="AbstractResourceCollection (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractResourceCollection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/geotools/feature/collection/AbstractFeatureList.html" title="class in org.geotools.feature.collection"><B>PREV CLASS</B></A> <A HREF="../../../../org/geotools/feature/collection/AbstractResourceList.html" title="class in org.geotools.feature.collection"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="AbstractResourceCollection.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.feature.collection</FONT><BR>Class AbstractResourceCollection</H2><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>AbstractResourceCollection</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>, <A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/geotools/feature/collection/AbstractFeatureCollection.html" title="class in org.geotools.feature.collection">AbstractFeatureCollection</A>, <A HREF="../../../../org/geotools/feature/AbstractFeatureCollection.html" title="class in org.geotools.feature">AbstractFeatureCollection</A>, <A HREF="../../../../org/geotools/feature/collection/AbstractResourceList.html" title="class in org.geotools.feature.collection">AbstractResourceList</A>, <A HREF="../../../../org/geotools/feature/collection/SubFeatureCollection.html" title="class in org.geotools.feature.collection">SubFeatureCollection</A></DD></DL><HR><DL><DT>public abstract class <B>AbstractResourceCollection</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></DL><P>Collection supporting close( Iterator ). <p> This implementation is a port of java.util.Collection with support for the use of close( Iterator ). This will allow subclasses that make use of resources during iterator() to be uses safely. </p> <p> Subclasses are reminded that they should construct their Iterator to return system resources once content has been exhuasted. While this class is safe, and we remind users, not all libraries that accept collections can be hacked. </p> <h2>How to Collectionify Resource Access</h2> <p> We need to do the same things as for use of AbstractCollection - namely: <ul> <li><b>Read-Only</b>: provide implementations for <code>size</code> and <tt>openIterator</tt> ( w/ <code>hasNext()</code> and <code>next()</code>.) and finally closeIteartor( iterator )<p> </li> <li><b>Modifiable collection</b> Do all of the above and supply <code>add( Object )</code> let that <code>Iterator</code> do <tt>remove()</tt> </li> </ul> And of course subclass, we are after all feelign <b>abstract</b> today :-) </p> <p> Why not play with <code>iterator()</code>? Because we are keeping track of them for later <code>purge()</code>... </p><P><P><DL><DT><B>Author:</B></DT> <DD>Jody Garnett, Refractions Research, Inc.</DD><DT><B>Module:</B></DT><DD><CODE><B>module/main</B></CODE> (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-main/"><CODE>gt2-main.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/main/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/module/main/src/org/geotools/feature/collection/AbstractResourceCollection.java">SVN head</A>)</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#open">open</A></B></CODE><BR> Set of open resource iterators</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#AbstractResourceCollection()">AbstractResourceCollection</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#add(java.lang.Object)">add</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE><BR> Implement to support modification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#addAll(java.util.Collection)">addAll</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE><BR> Adds all of the elements in the specified collection to this collection (optional operation).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#clear()">clear</A></B>()</CODE><BR> Removes all of the elements from this collection (optional operation).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#close(java.util.Iterator)">close</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> close)</CODE><BR> Clean up after any resources assocaited with this iteartor in a manner similar to JDO collections. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#closeIterator(java.util.Iterator)">closeIterator</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> close)</CODE><BR> Please override to cleanup after your own iterators, and any used resources. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#contains(java.lang.Object)">contains</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE><BR> Returns <tt>true</tt> if this collection contains the specified element. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#containsAll(java.util.Collection)">containsAll</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> c)</CODE><BR> Returns <tt>true</tt> if this collection contains all of the elements in the specified collection. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#isEmpty()">isEmpty</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#iterator()">iterator</A></B>()</CODE><BR> Please implement! </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?