Java Doc for DisjointSet.java in  » GIS » GeoTools-2.4.1 » org » geotools » util » 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.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.AbstractSet
   org.geotools.util.DisjointSet

DisjointSet
public class DisjointSet extends AbstractSet implements Serializable(Code)
A set which is disjoint from others DisjointSet s. Two sets are disjoint (or mutually exclusive
 DisjointSet set0 = new DisjointSet(true); // Used as the trash set.
 DisjointSet set1 = new DisjointSet(set0);
 DisjointSet set2 = new DisjointSet(set0);
 
Disjoint sets are thread-safe.
since:
   2.0
version:
   $Id: DisjointSet.java 22482 2006-10-31 02:58:00Z desruisseaux $
author:
   Martin Desruisseaux



Constructor Summary
public  DisjointSet()
     Construct a initially empty set.
public  DisjointSet(boolean hasTrash)
     Construct a initially empty set with an optional trash set.
public  DisjointSet(DisjointSet disjointSet)
     Construct a new set mutually exclusive with the specified set.

Method Summary
public  booleanadd(Object element)
     Ensures that this collection contains the specified element. Adding an element to this set will remove it from any mutually exclusive set.
Parameters:
  element - Element whose presence in this set is to be ensured.
public  booleanaddAll(Collection c)
     Adds all of the elements in the specified collection to this set. All of the elements will be removed from mutually exclusive sets.
Parameters:
  c - collection whose elements are to be added to this set.
public  voidclear()
     Removes all of the elements from this set.
public  booleancontains(Object element)
     Returns true if this set contains the specified element.
Parameters:
  element - Object to be checked for containment in this set.
public  booleancontainsAll(Collection c)
     Returns true if this set contains all of the elements in the specified collection.
Parameters:
  c - collection to be checked for containment in this collection.
public  booleanequals(Object set)
     Compare this set with the specified object for equality.
public  SetgetTrash()
     Returns the trash set, or null if there is none.
public  inthashCode()
     Returns an hash value for this set.
public  Iteratoriterator()
     Returns an iterator over the elements in this collection.
public  booleanremove(Object element)
     Removes a single instance of the specified element from this set, if it is present.
public  booleanremoveAll(Collection c)
     Removes from this set all of its elements that are contained in the specified collection.
public  booleanretainAll(Collection c)
     Retains only the elements in this set that are contained in the specified collection.
public  intsize()
     Returns the number of elements in this set.
public  Object[]toArray()
     Returns an array containing all of the elements in this collection.
public  Object[]toArray(Object[] a)
     Returns an array containing all of the elements in this collection.
Parameters:
  a - The array into which the elements of the set are to bestored, if it is big enough; otherwise, a new array ofthe same runtime type is allocated for this purpose.
public  StringtoString()
     Returns a string representation of this set.


Constructor Detail
DisjointSet
public DisjointSet()(Code)
Construct a initially empty set. There is initially no other set mutually exclusive with this one. Mutually exclusive sets must be created using the DisjointSet(DisjointSet) constructor with this newly created set as argument.

DisjointSet s constructed using this constructor has no trash. All remove operations on this set really remove all references to the removed element, like a usual Set . This is opposed to moving the element to a "trash" set, which is allowed by the DisjointSet(true) constructor.




DisjointSet
public DisjointSet(boolean hasTrash)(Code)
Construct a initially empty set with an optional trash set. There is initially no other set mutually exclusive with this one. Mutually exclusive sets must be created using the DisjointSet(DisjointSet) constructor with this newly created set as argument.
Parameters:
  hasTrash - If true , all operationswill add removed elements to a trash set (thus, really just moving theelement to the trash). If false , there is no trash and thisconstructor behave like the no-argument constructor.
See Also:   DisjointSet.getTrash



DisjointSet
public DisjointSet(DisjointSet disjointSet)(Code)
Construct a new set mutually exclusive with the specified set. All sets mutually exclusive with disjointSet will also be mutually exclusive with the newly created set. If disjointSet has a trash set, the newly created set will use the same trash (i.e. all remove operations will really move the element to the trash set). Otherwise, the new DisjointSet have no trash.
Parameters:
  disjointSet - The set to be disjoint from.




Method Detail
add
public boolean add(Object element)(Code)
Ensures that this collection contains the specified element. Adding an element to this set will remove it from any mutually exclusive set.
Parameters:
  element - Element whose presence in this set is to be ensured. true if the set changed as a result of the call.



addAll
public boolean addAll(Collection c)(Code)
Adds all of the elements in the specified collection to this set. All of the elements will be removed from mutually exclusive sets.
Parameters:
  c - collection whose elements are to be added to this set. true if this set changed as a result of the call.



clear
public void clear()(Code)
Removes all of the elements from this set. If this DisjointSet has a trash set, all removed elements will be added to the trash set.



contains
public boolean contains(Object element)(Code)
Returns true if this set contains the specified element.
Parameters:
  element - Object to be checked for containment in this set. true if this set contains the specified element.



containsAll
public boolean containsAll(Collection c)(Code)
Returns true if this set contains all of the elements in the specified collection.
Parameters:
  c - collection to be checked for containment in this collection. true if this set contains all of the elements inthe specified collection.



equals
public boolean equals(Object set)(Code)
Compare this set with the specified object for equality.



getTrash
public Set getTrash()(Code)
Returns the trash set, or null if there is none. The trash set receive all elements removed from this set.



hashCode
public int hashCode()(Code)
Returns an hash value for this set.



iterator
public Iterator iterator()(Code)
Returns an iterator over the elements in this collection.



remove
public boolean remove(Object element)(Code)
Removes a single instance of the specified element from this set, if it is present. If this DisjointSet has a trash set, the removed element will be added to the trash set.
Parameters:
  element - Element to be removed from this set. true if the set changed as a result of the call.



removeAll
public boolean removeAll(Collection c)(Code)
Removes from this set all of its elements that are contained in the specified collection. If this DisjointSet has a trash set, all removed elements will be added to the trash set.
Parameters:
  c - elements to be removed from this set. true if this set changed as a result of the call.



retainAll
public boolean retainAll(Collection c)(Code)
Retains only the elements in this set that are contained in the specified collection. If this DisjointSet has a trash set, all removed elements will be added to the trash set.
Parameters:
  c - elements to be retained in this collection. true if this collection changed as a result of the call.



size
public int size()(Code)
Returns the number of elements in this set. The size of this set may change as a result of adding elements to a mutually exclusive set.



toArray
public Object[] toArray()(Code)
Returns an array containing all of the elements in this collection. an array containing all of the elements in this set.



toArray
public Object[] toArray(Object[] a)(Code)
Returns an array containing all of the elements in this collection.
Parameters:
  a - The array into which the elements of the set are to bestored, if it is big enough; otherwise, a new array ofthe same runtime type is allocated for this purpose. an array containing the elements of the set.



toString
public String toString()(Code)
Returns a string representation of this set.



Methods inherited from java.util.AbstractSet
public boolean equals(Object o)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean removeAll(Collection c)(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.