Java Doc for AbstractResourceList.java in  » GIS » GeoTools-2.4.1 » org » geotools » feature » collection » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.feature.collection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.feature.collection.AbstractResourceCollection
      org.geotools.feature.collection.AbstractResourceList

All known Subclasses:   org.geotools.feature.collection.SubResourceList,  org.geotools.feature.collection.AbstractFeatureList,
AbstractResourceList
abstract public class AbstractResourceList extends AbstractResourceCollection implements ResourceList(Code)
Starter for resource based list implementations.

Same deal as ResouceCollections - iterators that need to be closed. This implementation is set up for random access happy content, like an array list.

Read-only:

  • get(int index)
  • size()

For read/write:

  • set(index, element) - for fixed length
  • add(index, element) and remove(index) for dynamic length
As usual override anything if you have a faster implementation, say based on a shapefile index.


author:
   Jody Garnett, Refractions Research, Inc.
See Also:   AbstractList
since:
   GeoTools 2.2


Field Summary
protected transient  intmodCount
     The number of times this list has been modified.

Constructor Summary
protected  AbstractResourceList()
    

Method Summary
public  booleanadd(Object item)
     Appends element.

This implementation calls add(size(), o).

Note that this implementation throws an UnsupportedOperationException unless add(int, Object) is overridden.
Parameters:
  item - the Object element to be appended to this list.

public  voidadd(int index, Object element)
     Inserts the specified element at the specified position in this list (optional operation).
public  booleanaddAll(int index, Collection c)
     Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
public  voidclear()
     Removes all of the elements from this collection (optional operation).
protected  voidcloseIterator(Iterator close)
    
public  booleanequals(Object o)
     Compares the specified object with this list for equality.
abstract public  Objectget(int index)
     item at the specified index.
public  inthashCode()
     Returns the hash code value for this list.
public  intindexOf(Object o)
     Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.
public  intlastIndexOf(Object o)
     Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.
public  ListIteratorlistIterator()
     Returns listIterator(0).
public  ListIteratorlistIterator(int index)
     Returns a list iterator of the elements in this list from index on.
public  ListIteratoropenIterator(int index)
    
protected  IteratoropenIterator()
     Returns a quick iterator that uses get and size methods.
public  Objectremove(int index)
     Removes the element at the specified position in this list (optional operation).
public  voidremoveRange(int fromIndex, int toIndex)
    
public  Objectset(int index, Object item)
     Replaces item in position index (optional operation).

This implementation always throws an UnsupportedOperationException.
Parameters:
  index - index of element to replace.
Parameters:
  item - the Object element to be stored at the specified position.

public  ListsubList(int fromIndex, int toIndex)
     view of the portion of this list between fromIndex up to toIndex.

Field Detail
modCount
protected transient int modCount(Code)
The number of times this list has been modified.




Constructor Detail
AbstractResourceList
protected AbstractResourceList()(Code)




Method Detail
add
public boolean add(Object item)(Code)
Appends element.

This implementation calls add(size(), o).

Note that this implementation throws an UnsupportedOperationException unless add(int, Object) is overridden.
Parameters:
  item - the Object element to be appended to this list. true (as per the general contract ofCollection.add).
throws:
  UnsupportedOperationException - if the add method is not supported by this Set.
throws:
  ClassCastException - if the class of the specified element prevents it from beingadded to this set.
throws:
  IllegalArgumentException - some aspect of this element prevents it from being added tothis collection.




add
public void add(int index, Object element)(Code)
Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

This implementation always throws an UnsupportedOperationException.
Parameters:
  index - index at which the specified element is to be inserted.
Parameters:
  element - element to be inserted.
throws:
  UnsupportedOperationException - if the add method is not supported by this list.
throws:
  ClassCastException - if the class of the specified element prevents it from beingadded to this list.
throws:
  IllegalArgumentException - if some aspect of the specified element prevents it frombeing added to this list.
throws:
  IndexOutOfBoundsException - index is out of range (index <0 || index > size()).




addAll
public boolean addAll(int index, Collection c)(Code)
Inserts all of the elements in the specified collection into this list at the specified position (optional operation).

Note that this implementation throws an UnsupportedOperationException unless add(int, Object) is overridden. true if this list changed as a result of the call.
Parameters:
  index - index at which to insert the first element from the specifiedcollection.
Parameters:
  c - elements to be inserted into this List.
throws:
  UnsupportedOperationException - if the addAll method is not supported by thislist.
throws:
  ClassCastException - if the class of an element of the specified collectionprevents it from being added to this List.
throws:
  IllegalArgumentException - some aspect an element of the specified collection preventsit from being added to this List.
throws:
  IndexOutOfBoundsException - index out of range (index < 0|| index > size()).
throws:
  NullPointerException - if the specified collection is null.




clear
public void clear()(Code)
Removes all of the elements from this collection (optional operation).

This implementation calls removeRange(0, size()).

Note that this implementation throws an UnsupportedOperationException unless remove(int index) or removeRange(int fromIndex, int toIndex) is overridden.
throws:
  UnsupportedOperationException - if the clear method is not supported by thisCollection.




closeIterator
protected void closeIterator(Iterator close)(Code)



equals
public boolean equals(Object o)(Code)
Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if (e1==null ? e2==null : e1.equals(e2)).) In other words, two lists are defined to be equal if they contain the same elements in the same order.

This implementation first checks if the specified object is this list. If so, it returns true; if not, it checks if the specified object is a list. If not, it returns false; if so, it iterates over both lists, comparing corresponding pairs of elements. If any comparison returns false, this method returns false. If either iterator runs out of elements before the other it returns false (as the lists are of unequal length); otherwise it returns true when the iterations complete.
Parameters:
  o - the object to be compared for equality with this list. true if the specified object is equal to this list.




get
abstract public Object get(int index)(Code)
item at the specified index.
Parameters:
  index - index of item the item at the specified index.
throws:
  IndexOutOfBoundsException - if index is not between 0 and size



hashCode
public int hashCode()(Code)
Returns the hash code value for this list.

This implementation uses exactly the code that is used to define the list hash function in the documentation for the List.hashCode method. the hash code value for this list.




indexOf
public int indexOf(Object o)(Code)
Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

This implementation first gets a list iterator (with listIterator()). Then, it iterates over the list until the specified element is found or the end of the list is reached.
Parameters:
  o - element to search for. the index in this List of the first occurence of the specifiedelement, or -1 if the List does not contain this element.




lastIndexOf
public int lastIndexOf(Object o)(Code)
Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.

This implementation first gets a list iterator that points to the end of the list (with listIterator(size())). Then, it iterates backwards over the list until the specified element is found, or the beginning of the list is reached.
Parameters:
  o - element to search for. the index in this list of the last occurence of the specifiedelement, or -1 if the list does not contain this element.




listIterator
public ListIterator listIterator()(Code)
Returns listIterator(0). listIterator(0)
See Also:   AbstractResourceList.listIterator(int)



listIterator
public ListIterator listIterator(int index)(Code)
Returns a list iterator of the elements in this list from index on.
Parameters:
  index - a list iterator from index *
throws:
  IndexOutOfBoundsException - if the specified index is out of range
See Also:   AbstractResourceList.modCount



openIterator
public ListIterator openIterator(int index)(Code)



openIterator
protected Iterator openIterator()(Code)
Returns a quick iterator that uses get and size methods.

As with all resource collections it is assumed that the iterator will be closed after use.

an iterator over the elements in this list in proper sequence.
See Also:   AbstractResourceList.modCount



remove
public Object remove(int index)(Code)
Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

This implementation always throws an UnsupportedOperationException.
Parameters:
  index - the index of the element to remove. the element previously at the specified position.
throws:
  UnsupportedOperationException - if the remove method is not supported by thislist.
throws:
  IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).




removeRange
public void removeRange(int fromIndex, int toIndex)(Code)
Removes from this list all of the elements whose index is between fromIndex upto toIndex
Parameters:
  fromIndex - index of first element to be removed.
Parameters:
  toIndex - index after last element to be removed.



set
public Object set(int index, Object item)(Code)
Replaces item in position index (optional operation).

This implementation always throws an UnsupportedOperationException.
Parameters:
  index - index of element to replace.
Parameters:
  item - the Object element to be stored at the specified position. the element previously at the specified position.
throws:
  UnsupportedOperationException - if the set method is not supported by this List.
throws:
  ClassCastException - if the class of the specified element prevents it from beingadded to this list.
throws:
  IllegalArgumentException - if some aspect of the specified element prevents it frombeing added to this list.
throws:
  IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).




subList
public List subList(int fromIndex, int toIndex)(Code)
view of the portion of this list between fromIndex up to toIndex.
Parameters:
  fromIndex -
Parameters:
  toIndex - a view of the specified range within this list.
throws:
  IndexOutOfBoundsException -
throws:
  IllegalArgumentException - endpoint indices out of order



Fields inherited from org.geotools.feature.collection.AbstractResourceCollection
final protected Set open(Code)(Java Doc)

Methods inherited from org.geotools.feature.collection.AbstractResourceCollection
public boolean add(Object o)(Code)(Java Doc)
public boolean addAll(Collection c)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
final public void close(Iterator close)(Code)(Java Doc)
abstract protected void closeIterator(Iterator close)(Code)(Java Doc)
public boolean contains(Object o)(Code)(Java Doc)
public boolean containsAll(Collection c)(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
final public Iterator iterator()(Code)(Java Doc)
abstract protected Iterator openIterator()(Code)(Java Doc)
public void purge()(Code)(Java Doc)
public boolean remove(Object o)(Code)(Java Doc)
public boolean removeAll(Collection c)(Code)(Java Doc)
public boolean retainAll(Collection c)(Code)(Java Doc)
abstract public int size()(Code)(Java Doc)
public Object[] toArray()(Code)(Java Doc)
public Object[] toArray(Object[] a)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.