abstractresourcecollection.html

来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 885 行 · 第 1/3 页

HTML
885
字号
<DT><B>Returns:</B><DD><tt>true</tt> if this collection changed as a result of the         call.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if this collection does not         support the <tt>addAll</tt> method.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#add(java.lang.Object)"><CODE>add(Object)</CODE></A></DL></DD></DL><HR><A NAME="removeAll(java.util.Collection)"><!-- --></A><H3>removeAll</H3><PRE>public boolean <B>removeAll</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>&nbsp;c)</PRE><DL><DD>Removes from this collection all of its elements that are contained in the specified collection (optional operation). <p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - elements to be removed from this collection.<DT><B>Returns:</B><DD><tt>true</tt> if this collection changed as a result of the         call.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the <tt>removeAll</tt> method 	       is not supported by this collection.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A>, <A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#contains(java.lang.Object)"><CODE>contains(Object)</CODE></A></DL></DD></DL><HR><A NAME="retainAll(java.util.Collection)"><!-- --></A><H3>retainAll</H3><PRE>public boolean <B>retainAll</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>&nbsp;c)</PRE><DL><DD>Retains only the elements in this collection that are contained in the specified collection (optional operation).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - elements to be retained in this collection.<DT><B>Returns:</B><DD><tt>true</tt> if this collection changed as a result of the         call.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the <tt>retainAll</tt> method 	       is not supported by this Collection.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the specified collection is null.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A>, <A HREF="../../../../org/geotools/feature/collection/AbstractResourceCollection.html#contains(java.lang.Object)"><CODE>contains(Object)</CODE></A></DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all of the elements from this collection (optional operation).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#clear()" title="class or interface in java.util">clear</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the <tt>clear</tt> method is 		  not supported by this collection.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string representation of this collection.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a string representation of this collection.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Please implement! <p> Note: If you return a ResourceIterator, the default implemntation of close( Iterator ) will know what to do.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Iterator</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public abstract int <B>size</B>()</PRE><DL><DD>Returns the number of elements in this collection.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html#size()" title="class or interface in java.util">size</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Number of items, or Interger.MAX_VALUE</DL></DD></DL><HR><A NAME="close(java.util.Iterator)"><!-- --></A><H3>close</H3><PRE>public final void <B>close</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>&nbsp;close)</PRE><DL><DD>Clean up after any resources assocaited with this iteartor in a manner similar to JDO collections. </p> Example (safe) use:<pre><code> Iterator iterator = collection.iterator(); try {     for( Iterator i=collection.iterator(); i.hasNext();){          Feature feature = (Feature) i.hasNext();          System.out.println( feature.getID() );     } } finally {     collection.close( iterator ); } </code></pre> </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html#close(java.util.Iterator)">close</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>close</CODE> - </DL></DD></DL><HR><A NAME="openIterator()"><!-- --></A><H3>openIterator</H3><PRE>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> <B>openIterator</B>()</PRE><DL><DD>Open a resource based Iterator, we will call close( iterator ). <p> Please subclass to provide your own iterator for the the ResourceCollection, note <code>iterator()</code> is implemented to call <code>open()</code> and track the results in for later <code>purge()</code>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Iterator based on resource use</DL></DD></DL><HR><A NAME="closeIterator(java.util.Iterator)"><!-- --></A><H3>closeIterator</H3><PRE>protected abstract void <B>closeIterator</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>&nbsp;close)</PRE><DL><DD>Please override to cleanup after your own iterators, and any used resources. <p> As an example if the iterator was working off a File then the inputstream should be closed. </p> <p> Subclass must call super.close( close ) to allow the list of open iterators to be adjusted. </p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>close</CODE> - Iterator, will not be <code>null</code></DL></DD></DL><HR><A NAME="purge()"><!-- --></A><H3>purge</H3><PRE>public void <B>purge</B>()</PRE><DL><DD>Close any outstanding resources released by this resources. <p> This method should be used with great caution, it is however available to allow the use of the ResourceCollection with algorthims that are unaware of the need to close iterators after use. </p> <p> Example of using a normal Collections utility method:<pre><code> Collections.sort( collection ); collection.purge();  </code></pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html#purge()">purge</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/AbstractResourceCollection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/geotools/feature/collection/AbstractFeatureList.html" title="class in org.geotools.feature.collection"><B>PREV CLASS</B></A>&nbsp;&nbsp;<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>  &nbsp;&nbsp;<A HREF="AbstractResourceCollection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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