Java Doc for ListSet.java in  » J2EE » Jaffa » org » jaffa » 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 » J2EE » Jaffa » org.jaffa.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jaffa.util.ListSet

ListSet
public class ListSet implements Set,Cloneable,Serializable(Code)
This class is backed by an ArrayList. Features are 1) Ensure the Set functionality of unique elements(including a null) in this data structure 2) Iterate through the list in the order in which the entries were made


Field Summary
 Listm_set
    

Constructor Summary
public  ListSet()
    
public  ListSet(int initialCapacity)
     Creates new ListSet specifying the initial capacity.
public  ListSet(Collection c)
     Creates new ListSet from an existing Collection.

Method Summary
public  booleanadd(Object o)
     Adds the specified element to this set if it is not already present.
Parameters:
  o - element to be added to this set.
public  voidadd(int index, Object o)
     Adds the specified element to this set if it is not already present, at the specified index.
public  booleanaddAll(Collection c)
     Adds all of the elements in the specified collection to this set if they're not already present.
Parameters:
  c - collection whose elements are to be added to this set.
public  voidclear()
     Removes all of the elements from this set.
public  Objectclone()
     Returns a clone of the Set.
throws:
  CloneNotSupportedException - if cloning is not supported.
public  booleancontains(Object o)
     Returns true if this set contains the specified element.
Parameters:
  o - element whose presence in this set is to be tested.
public  booleancontainsAll(Collection c)
     Returns true if this set contains all of the elements of the specified collection.
Parameters:
  c - collection to be checked for containment in this set.
public  booleanequals(Object o)
     Compares the specified object with this set for equality.
Parameters:
  o - Object to be compared for equality with this set.
public  Objectget(int index)
     Returns the element from the specified position.
Parameters:
  index - The position from which the element is to be retrieved.
public  inthashCode()
     Returns the hash code value for this set.
public  intindexOf(Object o)
     Returns the index of the element in this set.
Parameters:
  o - The element whose index is to be found.
public  booleanisEmpty()
     Returns true if this set contains no elements.
public  Iteratoriterator()
     Returns an iterator over the elements in this set.
public  booleanremove(Object o)
     Removes the specified element from this set if it is present.
Parameters:
  o - object to be removed from this set, if present.
public  Objectremove(int index)
     Remove the element from the specified position.
Parameters:
  index - The position from which the element is to be removed.
public  booleanremoveAll(Collection c)
     Removes from this set all of its elements that are contained in the specified collection.
Parameters:
  c - collection that defines which elements will be removed from this set.
public  booleanretainAll(Collection c)
     Retains only the elements in this set that are contained in the specified collection.
Parameters:
  c - collection that defines which elements this set will retain.
public  intsize()
     Returns the number of elements in this set.
public  Object[]toArray()
     Returns an array containing all of the elements in this set.
public  Object[]toArray(Object[] a)
     Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array.
Parameters:
  a - the array into which the elements of this set are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.

Field Detail
m_set
List m_set(Code)




Constructor Detail
ListSet
public ListSet()(Code)
Creates new ListSet



ListSet
public ListSet(int initialCapacity)(Code)
Creates new ListSet specifying the initial capacity.
Parameters:
  initialCapacity - The initial capacity.



ListSet
public ListSet(Collection c)(Code)
Creates new ListSet from an existing Collection.
Parameters:
  c - An existing collection.




Method Detail
add
public boolean add(Object o)(Code)
Adds the specified element to this set if it is not already present.
Parameters:
  o - element to be added to this set. true if this set did not already contain the specified element.



add
public void add(int index, Object o)(Code)
Adds the specified element to this set if it is not already present, at the specified index.
Parameters:
  index - The position at which the element is to be added.
Parameters:
  o - element to be added to this set.



addAll
public boolean addAll(Collection c)(Code)
Adds all of the elements in the specified collection to this set if they're not already present.
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.



clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a clone of the Set.
throws:
  CloneNotSupportedException - if cloning is not supported. Should never happen. a clone of the Set.



contains
public boolean contains(Object o)(Code)
Returns true if this set contains the specified element.
Parameters:
  o - element whose presence in this set is to be tested. 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 of the specified collection.
Parameters:
  c - collection to be checked for containment in this set. true if this set contains all of the elements of the specified collection.



equals
public boolean equals(Object o)(Code)
Compares the specified object with this set for equality.
Parameters:
  o - Object to be compared for equality with this set. true if the specified Object is equal to this set.



get
public Object get(int index)(Code)
Returns the element from the specified position.
Parameters:
  index - The position from which the element is to be retrieved. the element from the specified position.



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



indexOf
public int indexOf(Object o)(Code)
Returns the index of the element in this set.
Parameters:
  o - The element whose index is to be found. the index of the element in this set.



isEmpty
public boolean isEmpty()(Code)
Returns true if this set contains no elements. true if this set contains no elements.



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



remove
public boolean remove(Object o)(Code)
Removes the specified element from this set if it is present.
Parameters:
  o - object to be removed from this set, if present. true if the set contained the specified element.



remove
public Object remove(int index)(Code)
Remove the element from the specified position.
Parameters:
  index - The position from which the element is to be removed. the element being removed.



removeAll
public boolean removeAll(Collection c)(Code)
Removes from this set all of its elements that are contained in the specified collection.
Parameters:
  c - collection that defines which elements will 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.
Parameters:
  c - collection that defines which elements this set will retain. 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 number of elements in this set.



toArray
public Object[] toArray()(Code)
Returns an array containing all of the elements in this set. 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 set; the runtime type of the returned array is that of the specified array.
Parameters:
  a - the array into which the elements of this set are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array



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.