defaultfeaturecollection.html

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

HTML
1,240 行
字号
<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#remove(java.lang.Object)" title="class or interface in java.util">remove</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>o</CODE> - element to be removed from this collection, if present.<DT><B>Returns:</B><DD><tt>true</tt> if this collection changed as a result of the call</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;collection)</PRE><DL><DD>Removes all this collection's elements that are also contained in the specified collection (optional operation).  After this call returns, this collection will contain no elements in common with the specified 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#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>collection</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>See Also:</B><DD><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A>, <A HREF="../../../org/geotools/feature/DefaultFeatureCollection.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;collection)</PRE><DL><DD>Retains only the elements in this collection that are contained in the specified collection (optional operation).  In other words, removes from this collection all of its elements that are not contained in the specified 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#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>collection</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>See Also:</B><DD><A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#remove(java.lang.Object)"><CODE>remove(Object)</CODE></A>, <A HREF="../../../org/geotools/feature/DefaultFeatureCollection.html#contains(java.lang.Object)"><CODE>contains(Object)</CODE></A></DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of elements in this collection.  If this collection contains more than <tt>Integer.MAX_VALUE</tt> elements, returns <tt>Integer.MAX_VALUE</tt>.<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>the number of elements in this collection</DL></DD></DL><HR><A NAME="toArray()"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</B>()</PRE><DL><DD>Returns an array containing all of the elements in this collection.  If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.  <p> The returned array will be "safe" in that no references to it are maintained by this collection.  (In other words, this method must allocate a new array even if this collection is backed by an array). The caller is thus free to modify the returned array. </p>  <p> This method acts as bridge between array-based and collection-based APIs. </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#toArray()" title="class or interface in java.util">toArray</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>an array containing all of the elements in this collection</DL></DD></DL><HR><A NAME="toArray(java.lang.Object[])"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] <B>toArray</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>[]&nbsp;a)</PRE><DL><DD>Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.  <p> If this collection fits in the specified array with room to spare (i.e., the array has more elements than this collection), the element in the array immediately following the end of the collection is set to <tt>null</tt>.  This is useful in determining the length of this collection <i>only</i> if the caller knows that this collection does not contain any <tt>null</tt> elements.) </p>  <p> If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order. </p>  <p> Like the <tt>toArray</tt> method, this method acts as bridge between array-based and collection-based APIs.  Further, this method allows precise control over the runtime type of the output array, and may, under certain circumstances, be used to save allocation costs </p>  <p> Suppose <tt>l</tt> is a <tt>List</tt> known to contain only strings. The following code can be used to dump the list into a newly allocated array of <tt>String</tt>: <pre>     String[] x = (String[]) v.toArray(new String[0]); </pre> </p>  <p> Note that <tt>toArray(new Object[0])</tt> is identical in function to <tt>toArray()</tt>. </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#toArray(java.lang.Object[])" title="class or interface in java.util">toArray</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>a</CODE> - the array into which the elements of this collection are to be        stored, if it is big enough; otherwise, a new array of the same        runtime type is allocated for this purpose.<DT><B>Returns:</B><DD>an array containing the elements of this collection</DL></DD></DL><HR><A NAME="getFeatureType()"><!-- --></A><H3>getFeatureType</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> <B>getFeatureType</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Gets a reference to the type of this feature collection. <p> There are several limitations on the use of FeatureType with respect to a FeatureCollection. </p> <p> GML 3.x: all FeatureCollections decend from gml:AbstractFeatureCollectionType: <ul> <li>featureMember 0..* allows _Feature or xlink:ref <li>featureMembers 0..1 contents treated as _Feature </ul> The contents defined in this manner is returned the collection iterator() method. </p> <p> GML 3.x: gml:AbstractFeatureCollectionType decends from gml:BoundedFeatureType: <ul> <li>metaDataProperty 0..* <li>description 0..1 <li>name 0..* <li>boundedBy 1..1 (required) <li>location 0..1 </ul> The value of the boundedBy attribute should be derived from the contents of the collection. </p> <h3>Implementation Notes</h3> <p> There is a difference between getFeatureType() and getSchema(), getSchema is named for historical reasons and reprensets the LCD FeatureType that best represents the contents of this collection. <ul> <li>The degenerate case returns the "_Feature" FeatureType, where the onlything known is that the contents are Features. <li>For a collection backed by a shapefiles (or database tables) the     FeatureType returned by getSchema() will complete describe each and every child in the collection. <li>For mixed content FeatureCollections you will need to check the FeatureType     of each Feature as it is retrived from the collection </ul> </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/FeatureCollection.html#getFeatureType()">getFeatureType</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A reference to this collections type</DL></DD></DL><HR><A NAME="getParent()"><!-- --></A><H3>getParent</H3><PRE>public <A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> <B>getParent</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Gets the feature collection this feature is stored in.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#getParent()">getParent</A></CODE> in interface <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The collection that is the parent of this feature.</DL></DD></DL><HR><A NAME="setParent(org.geotools.feature.FeatureCollection)"><!-- --></A><H3>setParent</H3><PRE>public void <B>setParent</B>(<A HREF="../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A>&nbsp;collection)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Sets the parent collection this feature is stored in, if it is not already set.  If it is set then this method does nothing.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/geotools/feature/Feature.html#setParent(org.geotools.feature.FeatureCollection)">setParent</A></CODE> in interface <CODE><A HREF="../../../o

⌨️ 快捷键说明

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